That puzzled me too. The 8 cursors that are returned, don't all have the same length. MultipleIterator returns an *array* with an element from each cursor it iterates over. And if one of the iterators has already been exhausted, NULL is returned instead. So I need to check for that here.