For compatibility with HLSL (and with the spec now that I've specified HLSL behavior). In other words, "max(min(upper, x), lower)" must become "min(max(x, lower), upper)".
I've changed the spec to follow SPIR-V behavior (undefined value returned in that case), so this is no longer a "bug", but it would still be slightly nicer for portability to follow HLSL.
WHLSL is no longer relevant.