The redefinition of `\href` when using `links-as-notes` must happen after the hyperref package has been loaded. Fixes: #8077