Fix importer bug where layer order would get screwed up