Fixed routing pre-processing copy_ways function.