Fix TypeError caused by incorrect CachedQuerySet unpickling.