We have added code to correct the .localentry values on assignments. However, we never clear the set so presumably it will still contain the (now dangling) MCSymbol pointers across a call to finish() and reset() in the streamer.
This is based on my speculation that it is the reason we are getting segmentation faults mentioned in https://bugs.llvm.org/show_bug.cgi?id=45366
I will work on providing a test case, but I am posting here so the OP of the mentioned PR can try this out and perhaps generate a reproducer.