Conditionally assigning link_resolver

Each time we call link_resolver (which is very often), a new instance of `LinkResolver` is created (and they're always basically the same stuff).
Doesn't this fix allow to just instantiate it once and reuse it every time?