Fix handling of positional url helper arguments when format is false

There is no need to subtract one from the path_params size when there is
no format parameter because it is not present in the path_params array.

Fixes #17819.
Merge pull request #18020 from binaryberry/handle-positional-args-with-format-false

Fix handling of positional url helper arguments when format is false