create a horrible hack to deal with deficit in libstd not taking const_iterator to std::vector::erase