A very slow implementation of permutation that relies on repeated_permutation