Filter out duplicate routes from aggregated trips and sort them properly