Cache the iterator value if something happens during the callback.