Function arguments now count towards no-shadow check (fixes #1584)

Interestingly, there was some code that explicitly avoided checking function arguments - so this was nice and easy to change.
Any suggestions? I was a bit stumped here.

Perhaps I should just unroll the loop?