Fixes #59162. The test has a comment explaining what's going on.
See also Symbol::extract() in lld/ELF/Symbols.cpp.
The included test sadly also passes if I pass just bd448f01a62,
while doing that isn't enough to make my bigger repro case work
(if I port just that, something else asserts later on, but with
this fix here everything's fine in my bigger repro).
I find the sentences since "When something then ..." are somewhat difficult to understand...