Fixes errors that can occur during remodelling after removing of a compo...

...nent, such as:

  AttributeError: Unable to determine parent at <Instance at server-df90c26d-3295-4413-a6b7-68283ccde6f7> ('NoneType' object has no attribute 'primaryAq') while getting device for <Instance at server-df90c26d-3295-4413-a6b7-68283ccde6f7>