fixes issues where the same variants have different hashes, because of sorting issues