Fixed routes->trie so that it correctly merges tries.