Fixed the ugly trampoline hack in match_links