<div dir="rtl"><div dir="ltr">To avoid duplications, MapVector stores Values inside the vector only, while the map caches key->indices to the vector.</div><div dir="ltr"><br></div><div dir="ltr">When a value is erased from the MapVector, it is removed from the vector, invalidating the cached vector indices stored in the map, so the map points to wrong locations and the MapVector is corrupted.</div>

<div dir="ltr"><br></div><div dir="ltr">Yaron<br></div><div dir="ltr"><br></div></div>