Fixed bug that made hashmap lose data

In case of collisions, hashmap could erase the elements in the same
bucket if the value that appears earlier in the same bucket is
overwritten. This bug took a while to find, but the fix was pretty
simple.