Modified the internal implementation for holding variable identifiers in scope.