The key was first added to the Dictionary<,>
when it had one hash code. After that the object was "mutated" to give a state where the hash code is some new number.
The Dictionary<,>
is therefore in an invalid state.
Do not mutate an object that might be a key in some hashtable somewhere, in a way the changes the hash code of that object.