If iteration of a queryset was interrupted (by a break, or a caught error), the next iterator would start from the second element as the cursor had already moved to the first. This is fixed by adding a rewind into the __iter__ method.