HashMap, HashSet: Fix another issue that causes remove to corrupt the container