This has been revealed by enabling the glibc++ assertions (-Wp,-D_GLIBCXX_ASSERTIONS) and running a static libstdc++ build, which happens to be the case when running the ArchLinux package builds.
Once exposed the issue is obvious, accessing an object from an out of bound vector. This doesn't cause any issue because hte memory is not freed/overriden and the vector clear() method just shrinks the capacity, but the standard lib can detect the issue.