Add support for variable scopes.