fixed bug where recursion to dead ends didn't increase the permutation count
(and some structures wouldn't finish)