The logic is mistakenly thinking it has expanded every node it knows about, but some are pulled in as unexpanded leafs initially. The logic should mark the requested iris (those entering the expand function as argument) as expanded, and treat others as not-expanded. And then when considering which iris need processing, check if they are expanded already or not.
The logic is mistakenly thinking it has expanded every node it knows about, but some are pulled in as unexpanded leafs initially. The logic should mark the requested iris (those entering the expand function as argument) as expanded, and treat others as not-expanded. And then when considering which iris need processing, check if they are expanded already or not.