determine the match shorthand target early.

Closes #7554.

This patch determines the `controller#action` directly in the `match` method when the shorthand syntax is used. this prevents problems with namespaces and scopes.