Fixed in 02588190492349fabde00c5a15b873ea61a9333e Tested in 2f126a3ab7d0991767ca84c562b8f3ae97b25c4e
There are no tests there for with or whenever, but those did not appear to misbehave when I tried them on the command line. Feel free to add more tests for those.