erp5: fix jinja2 zope_global_count variable scope