GROOVY-5775: XmlTemplateEngine does not escape expression values (subsequent refactor)