Don't issue W088 if identifier is found in function scope or global scope

This is as quick of a hack as I could come up with to fix this, but it seems to work.

(updating momentarily with a test case that W088 is still emit when expected)

Closes #1016
It's actually a pretty awful test name, so I'm happy to replace it with something else, just can't think of anything atm