MODE-2375 Fixed the logic of processing references after XML import

The reference properties should only be set at the end of the import, after all the nodes have been added to their respective parents - i.e. the nodes graph is fully created.  This is because when setting reference properties the referrer calculation(s) are performed.