I have a Map that uses a Set for the key type, like this:
Map, Val> map;
When I query map.containsKey(myBunchOfThing
Did you modify the set after insertion? If so, it's possible the set got sorted into a different bucket than the one it's looking in. When iterating, it does find your set, because it looks in the whole map.
I believe the contract for HashMap states you're not allowed to modify the hashcode for objects used as a key,