Fix #417: Can add same reference twice