CodeGen: move over-zealous assert into actual if statement.