generateUri() is now generateUrl(), works properly.

Moved around protocol check so that it won't interfere with URL
generation. Fixed so that route names are properly inherited in groups.