Some minor work for bug #8138.  It now doesn't put data into an image that is being edited, and it better defends against doubling.