Avoid another potentially ambiguous use of ternary operator inside reduce's implementation.