Fix infinite loop for URLRouter without any registered routes. Fixes #691.