Re-order `if` blocks to match language order

... for easier future maintenance.