Fix translator to take previous where statements into account.