patch-ids.c: use hashmap correctly