`NodeIterator` is not strongly typed and violates `undefined-field` checks. Variants to iterate files / directories etc. need to be created, and those filters/checks in the `NodeIterator` usages removed. This has a high blast radius and would benefit greatly from a test framework to validate current and new behaviour.