Reduce complexity of `getRouteMap()` by removing the early filtering