I think there might be an undesirable feature in the way paths are matched in the code that decides if a path should be delegated to a sub application.
The value is matched with ".startswith(pat)" which causes the delegation to choose the first sub application that handles a path similar to other sub application registered paths .
sub_app1 handles "/theme"
sub_app2 handles "/themes"
when I request "/themes" in my browser it's sub_app1's code that will handle it because .startswith(pat) will match "/theme" before "/themes" - thus giving me an undesired result.