The Fisher-Yates algorithm in the PermutationSampler has a conditional if statement within the loop that checks if the step is the first in the loop. It then swaps a position with itself. For example for the towards head variant:
This can be removed by altering the iteration loop:
An equivalent fix is available for the shuffle towards the tail.