Fix a regression with unused:true not working properly.

1.1.0 introduced a regression where unused:true behavior was changed.
It would only warn about unused variables if the variable was the last
formal parameter. What we want instead is to ignore all unused variables
before a used one but not after. This commit fixes that.

Closes GH-996.