How does this avoid the nesting bug? There are actually two bugs currently for my use-case:
1. The existing one where the code intended to detect nested includes fails to detect it
2. No way to know if nesting is happening, what level, or how many (that's the code I've added to mod_include)