Rough support for optional route keys, but not quite right.