Fix use of LINK2 when RELATIVE_LINK2 is more appropriate
Fix illegal anchor names
Normalize anchor name format