Allow variable shadowing in different scopes.
Fix error on checking for single-assignment vars.