Need to find all reachable keys before each recursion for pruning.