[ticket/13073] Correctly generate routes from subfolders like /adm

Ticket: https://tracker.phpbb.com/browse/PHPBB3-13073
This comment is true for the whole if. Also the second comment doesn't explain at all why it is done, it only says what it is done.