Refinements to xref-type template setup.