Fix another memory leak with custom importer