defensive programming to avoid duplicate links in the final linking