Start testing the scoping rules a bit more thoroughly.

As the final test shows, our current rules are deliberately not fully lexical.
This may or may not be a good plan in the long run.