Tweak sorting of conditions so it's stable, which aids in predictable node sharing.