Merge "Check that thumbnail is removed when db entry is deleted"