Squeeze redundant dinesions in get_record_for_name_and_level