Describe the bug
Media files deleted via the context menu in the metadata editor reappear when uploading new media files afterwards without saving in between both actions.
To Reproduce
Steps to reproduce the behavior:
- Open a process that contains images in the metadata editor
- Remove an image via the context menu
- Add a new image using the context menu
- See error
Expected behavior
Deleted media should not reappear when uploading new image files.
Screenshots

Release
3.6.0-SNAPSHOT