Fix issue 13594: next(Even)Permutation doesn't need to take input range by ref.
Merge pull request #2651 from quickfur/issue13594b

Fix issue 13594: next(Even)Permutation doesn't need to take input range by ref.