Discard MT when the image is deleted (see #9741)
Fix indentation
Merge pull request #880 from jburel/rebased/develop/delete-image-mt

Discard MT when the image is deleted (see #9741) (rebased onto develop)