Test conditional discard with side effects

Expand the conditional discard test case, with a new test case which triggers conditional rewriting by using conditionals with side effects in the right-hand side.