(PUP-4438) Ensure that required_repeated_param cannot follow optionals
Before this commit it was possible to declare a required repeated
parameter after optional parameters. This cannot be allowed since
it introduces ambiguities when dispatching the parameter values.