'Overridden from InclusionTag to push / pop context to avoid leaks'

def render_tag(self, context, **kwargs):

    context.push()
    template = self.get_template(context, **kwargs)
    data = self.get_context(context, **kwargs)
    output = render_to_string(template, flatten_context(data)).strip()
    context.pop()
    if kwargs.get('varname'):
        context[kwargs['varname']] = output
        return ''
    else:
        return output
