Reland 7a8b0b1595e7dc878b48cf9bbaa652087a6895db, with a fix that checks
!E.value().empty() to avoid inserting a zero to SlotRemap.
Debugged by rnk@ in https://bugs.chromium.org/p/chromium/issues/detail?id=1045650#c33 . I don't know how to get a WinEH reproduce.
clang-format: please reformat the code