second click on link in tree opens reference modal again, closes #22