This is a continuation of this question.
In the previous question we got a routine that can take two cyclically equivalent lists and determine their equivalence if all the elements in each list are unique:
cyc[list_] := RotateLeft[list, First@Ordering[list, 1]]
However, this routine fails e.g. for the lists
list1 = {1, 1, 1, 3, 1, 1};
list2 = {3, 1, 1, 1, 1, 1};
cyc[list1]==cyc[list2]
False
Is there a convenient way to generalize the routine to be able to deal with lists containing repeated elements efficiently as well? Thanks for any suggestion!