Small refactoring of read_map_objects().