HashMap, HashSet: Fix remove corrupting the container