if the issue is that you want to do some operations pre recursion and some operations post recursion, then maybe we can make a recurseTreeWithOperations() that take two operator functions pre and post.

Does the algorithm depend on the inspectForExteriorOcclusionsOperation() pass completing before the inspectForInteriorOcclusionsOperation() pass?