Fix corruption of file from moving of last attribute in top level collection.
Fix corruption of file from moving of last attribute in top level collection.

New algorithm attempted to preserve existing cases. In the top level collection we were not cleaning any potential parent references.

[#108344274]

concord-consortium/codap,concord-consortium/codap,concord-consortium/codap,concord-consortium/codap,concord-consortium/codap