Migrating invariant objects in indexes may corrupt indexes
Invariant objects may be added to indexed collections and participate in
indexes, but they do not get dependencyMaps since they cannot be modified.
However, it is currently permitted to migrate invariant objects. If invarient
objects are in an indexed collection, and are migrated, the index may not
be correctly updated due to the lack of dependency list. This means the
index may be corrupted regarding the invariant object.
Do not migrate instances that are invariant and participate in indexed
collections. Drop indexes on collections that contain invariant objects
prior to migration, and re-index after migration is complete.