Fix scan_args for the 'as_while' case properly.

Somebody else changed the code to add support for as_while, but this was done in a way that forces all users to think about this flags and is error prone.

Do it the simpler way by handling the distinction in scan_args itself.