Recursive search for link.

Modified from Appframwork UI implementation of checkAnchorClick().