Fix dereferencing of uninitialized iterators.