Fix a NPF when some components are removed.

Fix a NPF that occurs if you remove a component from the designer that
contains recursive references to themselves. See Ticket #457 in Trac.

Change-Id: Ic9991784d4aafa8d39a0fc5a4e1f1ff3ceda1337