Move symbol 'lifting' code out of rewrite().