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