Fix annoying bug in opera where deleting from a doc as you iterate doesn't work right.