Routemap: Fix an issue that shortestRoute() returns wrong results.