fix($route): fix redirection with optional/eager params

Fixes #9742
Closes #10202