https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112477
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Because in C++11 any use of a singular iterator, even copying it, was undefined behaviour. The debug mode checks have not been properly updated to reflect the relaxed preconditions in more recent standards.