Remove variables when determining the controller for match shorthand routes

When match is used inside a scope that contains path variables, the logic to determine the controller will return unusable results.

This patch removes the path variables from the segment, before determining the controller.