private void RemoveFromAncestorArray(string currentKeyName) { if (Ancestors.ContainsKey( currentKeyName)) { Ancestors .Remove(currentKeyName); } }