Fix bug in map_remove().

If a key being removed is at the head of a bucket chain,
the following buckets were accidentally removed from the map.