Minor reorganization of geocode_replace_loc