Allow multiple route parameters in dynamicPath middleware

Turns out, this is useful, and a silly limitation of the original middleware.