Fix a bug in fixup_links.