(#20607) tentative fix failing tests on windows

The PR GH 1722 unfortunately broke the testsuite on windows.
This commit might fix it (untested, as I don't have an access to a Windows machine right now).