[CORE][UI] thumbnails correctly removed when closing ImageViewer