This is documented to happen, and was implemented correctly in the other collections, but not in HashSet.