avoid modifying range name references that are not affected, fdo#86518

Change-Id: I0822fb96ebcb30326bcdd88f3900e6e01c85bcf5
Reviewed-on: https://gerrit.libreoffice.org/13299
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>