All repros use x86-64, an assertions build of this PR on PATH, and an empty directory.
addThinLTO calls (*GlobalResolutions)[Sym.getName()].setGUID(GUID) for local symbols too. lld gives locals Prevailing = true (sym->file == &f).
cat > a.ll <<'EOF'
target triple = "x86_64-unknown-linux-gnu"
define i32 @foo() { ret i32 1 }