fix crash when replacing a label.

crash happened when a label relation `'a ...` has the code
`[a A, b B, ...]` where `B` has any link within it and the user
tries to change the label relation to `b`

RelationView: fix usage of equal. was passing non-root codes to it