Do not modify vector while iterating over it in range-based for loop
This is undefined behavior leading to wrong behavior or crashes. Instead iterate backwards to not invalidate iterators that are still to be accessed.
This is undefined behavior leading to wrong behavior or crashes. Instead iterate backwards to not invalidate iterators that are still to be accessed.