Partial rewrite of shield link. It is local and behaves more closely to the global version from 8 months ago. Needs link detection optimization.