This reverts commit9b2ab41037and reinstatese62dc1f625with changes. This fix is speculative, since I don't have access to a crashing test case for the old code, and fixing the crash bug on Windows when C++20 is enabled seems more important than running it down.