Un-recursify.
Read pre-defined link mappings into dictionary.
Prioritize top-level anchors and don't link to current section.