This is not a general problem but something specific to your code.
The hash code of the key of a dictionary must not change. This is not the case with your
Column class, because as soon as any of its properties are changed, the hash code changes, too.
As long as an object is used as a key in the Dictionary, it must not change in any way that affects its hash value.
The background of this is the following: The dictionary retrieves and stores the hash code of the key at the time it is added. If the hash code of the key changed after that, it is different to the stored hash code and the object will not be seen as equal to the originally inserted key.
Dictionary<Column, string> is right, then I would guess it's because the type
Column is not compatible with how
Dictionary<TKey, TValue> checks equality - which is based on comparisons through
Equals - and my guess is that the
Column type does not implement these.
Change the key type of the dictionary to something more suited to comparisons and equality. Ideally use a string derived from the column's name.
Based on your code update, my guess is that something about the column has changed since it went into the dictionary that causes its 'live' hash code to change from what it was when it was first added to the Dictionary - so that could be any change in
ChildColumns that causes their HashCodes to change.