don't let the user delete attributes we're looping over
this isn't perfect, but it's good enough.
It can still crash if the user has one "foreach" loop nested
inside of another one, AND both loop over the same attributes,
AND a variable is deleted after the inner "foreach" loop is run.
The general answer then is "don't do that".
We could fix this by using the old way of copying all of the VPs,
looping over the copy, and then moving the copy back in place of
the original VPs. But that process is expensive, and almost always
not needed.
For now, it's simpler to just say "don't modify the attributes
you're looping over"