If I understand what you want, you want all Tom's to be clickable, but each should be clickable on its own and without affecting the others?
If so, try the following:
(if: $allowHints)[(replace: "Tom")[(link-replace: "Tom")[Tom, the blacksmith,]]]
That will replace each instance of the word "Tom" with a separate link. Each link's text is "Tom", which is replaced with "Tom, the blacksmith," upon being clicked.
NOTE: You do not need to compare a boolean value to one of the boolean literals. Conditional expressions ultimately resolve to a boolean value, so if your variable contains a boolean value, you may simply use it as-is in the conditional.