sc_containers: handle zero-length permutations