In Windows stdout and stderr are not line buffered, so the output of
stderr can be intermixed with the stdout, which will break the test when
checking with CHECK-NEXT and similar. Additionally it seems that stderr
always contains at least one new line.
Redirecting stderr to a file removes the problems with the mixing, and
since the stderr is not checked for this test, should not change
anything.