Merge #11558: Minimal code changes to allow msvc compilation