I just realised (again) that if hasNext returns false, the iterator is already closed automatically...