'The intercepted resolve(), which uses the helper above to set the
internal flag whenever an unsafe variable value is returned.'

def resolve(self, key):

    val = super(AnsibleContext, self).resolve(key)
    self._update_unsafe(val)
    return val
