Fix bug in import descriptor parsing and image_import_descriptor_by_name