Remove trivial branches in with_cond

Removes branches on constant values when using with_cond, improving the
performance of non-optimized code and (hopefully) improving compile times.

This is a fairly simple front-end optimization.