Don't duplicate relationship sequences while walking them.

Change-Id: If938f2f401af82d5d0122cbd0a78214829d1277c
Reviewed-on: https://gerrit.libreoffice.org/8685
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>