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