def on_duplicate(self, ar, master):
        if self.ref:
            self.ref += '(DUP)'
        super(Referrable, self).on_duplicate(ar, master)
After duplicating we must change the :attr:`ref`.
dataset/ETHPy150Open lsaffre/lino/lino/mixins/__init__.py/Referrable.on_duplicate