[ThinLTO] Do not duplicate import a function that is actually defined in the current module (#110064)
Doing so could cause a bug where the linker tries to remap a function
"reimported" from the current module when materializing it, causing a
lookup assert in the type mappings.