Make detection and removal of `complexVars` better.