I have updated code to iterate on maps with length > 1 (as done in translate_location and translate_location_to_course_locator). We cannot delete all map entries because we want to delete specific block_entry with same location.category as given item location.