Fix issue where null IdentifierOrTemplateInstances could be added to the parse tree, thus causing issues with the various visitor classes.