Bug #477708. Only remove the target, not the relation if there are still