std::vec: Make Permutations safe after finished

Make sure Permutations is side effect free after having returned None
the first time.