proper handling of duplicate link target ids