David Abrahams
I don't think any code is relying on the 2nd case, but it's hard to be sure. You could check for it by adding a generation counter in the iterator and assert if two iterators from different generations are compared. After all, they are effectively iterating different sequences.
I found a case where the second condition is required. Its in push_relabel_max_flow: while (1) { out_edge_iterator ai, ai_end; for (ai = current[u], ai_end = out_edges(u, g).second; ai != ai_end; ++ai) { edge_descriptor a = *ai; current is an vector of edge iterators. Notice the call to out_edges. This should be relatively easy to fix by storing the end iterators as well as the current iterator. THK