Fix error when trying to delete an image due to a bad container Upstream-commit: a39de418719dc6189025a760ca6b5c024a177b24 Component: engine