TreeIterator for nodes for explicit use (instead of casting to TreeIterator and hoping it's ok), conditional iterator filters for reuse.
ModelScanner: respect inline templates, skip generator node attributes altogether (not only the attribute itself, but also its children).