Added check for maximum nesting depth.
Holy cow. I think I have subtemplates and renderers working.