Fixed caching queryset bug that threw an exception on empty sets.