Fix EZP-23207: alternative fix for EZP-22615: "Not possible to remove an image from an object"