If necessary, wrap a variable reference in a THE-AST.
Removed code that is no longer used.