This is run every time around in the main linker loop. Once a match
has been found, stop trying to rematch such a symbol.
Not sure if this has any actual measurable performance impact though
(SymbolTable::findMangle() iterates over the whole symbol table for
each call and does fuzzy matching on top of that) but this makes the
code more reassuring to read at least. (This is in practice run for def
files listing undecorated stdcall functions to be exported.)
I think I see the issue: suppose there are two rounds of symbol resolution. This function will be called twice, and on the second call, it returns a different result to the caller. The result of this function is used to populate Export.symbolName, which is used to produce an import library, and that's what changes.