Check for instance of generic LinkAnnotation when querying target.

Resolves (Bug 44686)

Change-Id: I0ff962330e061aea66a25a923f46d6759e5ff6af
Merge "Check for instance of generic LinkAnnotation when querying target."