Bug 22190 - crash in read_context::get_or_compute_canonical_die
When computing a canonical DIE while reading DWARF, we crash in
get_or_compute_canonical_die basically because we loop over a vector
using an iterator which gets invalidated during the walk because some
code in the loop can increase the size of the vector (by adding
elements at its end) during the loop.
This patch fixes the issue by looping over the vector without using an
iterator that can be invalidated. The code now properly expects the
vector to grow during the walk.