Shuffle before distinct, difference operators

Fixes #221