If route shortnames are different but they have exact same headsign in the trip, data dictionary gets overwritten. As an example route 415 and 431 going to same dest will result in 415 routes getting overwritten
To fox this query logic has to be changed to filter down to trip-->route-->shortname in stoptimepatterns and compare this to the routes-->shortname in stops query.
If route shortnames are different but they have exact same headsign in the trip, data dictionary gets overwritten. As an example route 415 and 431 going to same dest will result in 415 routes getting overwritten To fox this query logic has to be changed to filter down to trip-->route-->shortname in stoptimepatterns and compare this to the routes-->shortname in stops query.