Fix a regression in the rhythm detection when dealing with triplet rhythms