Avoid if/unless at the end of a non-trivial block

Using an `if` or `unless` modifier at the end of a non-trivial multi-line block requires reading all the way to the end of the block before the reader becomes aware that the block is guarded by a condition.

Additionally, in the case where the code is being viewed as part of a patch, the condition at the end of the block may not even be visible in the diff context; this can make code reviews harder.