Fix shuffle() broken by commit 18b8f906afaeadb8cc3e091b3, add test so it doesn't happen again
Merge branch 'hotfix/fix-shuffle'