GROOVY-6916: Avoid stack overflow when rendering templates and improve the syntax for in-string rendering