fix regression when deleting image; re #7556