Use sets instead of lists for the sequences of ufuncs