GEOS-5533: fixed critical bug in FreemarkerTemplateResource