std::vec: Fix bug in test_permutations