Don't allow variables to self-reference

It might be useful for variables to be able to reference their
parent's scope, but this is simpler.

Fixes issue #594.