only sort if not monoidIsCommutative

Untested, but it compiles.