'Deep copy of a QuerySet doesn\'t populate the cache'

def __deepcopy__(self, memo):

    obj = self.__class__()
    for (k, v) in self.__dict__.items():
        if (k in ('_iter', '_result_cache')):
            obj.__dict__[k] = None
        else:
            obj.__dict__[k] = deepcopy(v, memo)
    return obj
