Fixed a bug with the ordering of the new name-ids when markers are created during parsing of template names.