You said: "This templatetag is called in the base template, which is extended by many other templates."
The question is: is this tag called from a named block? If so then you have a couple of potential problems.
{% block %}pushes a new dict onto the context stack and pops it when it reaches the corresponding `{% endblock%} '. This means that any context value created while in the block substantially out of scope at the output of the block.
- , , , {{block.super}}, , , .
{% block %}, , , , , , , .
, , , .
, , , .
: , , ! , Django , (.. ), ( , / ) ! 2 10 . , , . , a) MonkeyPatched _resolve_lookup(), , b) curry, , , "" .