It seems that related items can belong to multiple datasets. There doesn't seem to be an easy way to figure out which dataset the related item being deleted belongs to.