Fix EZP-23207: do not store attributes after removing image.