- Fixed template loop check, broken by changes in parse order
- Added template recursion depth limit. It needs a small limit, because of exorbitant stack space usage, xdebug compatibility problems, and the potential for O(N^2) memory usage in the template loop check.
- Made these two error messages more obvious in the parser output, with <span class="error"> instead of a comment. This is similar to the #expr error messages, which seem to have been well received by our template programmer community.