Make `if` and `while` conditions temporary

Closes #12033