MODE-2284 Changed the importer logic to handle replacing nodes that are referenced by nodes outside of the import scope