Issue #20155: Fix non-buildbot test failure on Windows.  Patch by Claudiu Popa,
revised by R. David Murray.
Merge with 3.4