Improve error messages when resolving routes.

This improves error messages when resolving routes in methods like `makeHref` where a trace may include unmatched subroutes.