gunittest: Fix stdout used instead of stderr (#1707)
Changes in 51fc3d6276a4f7468e3add3e535f99ff5f21ee91 (#1539) introduced a bug where stdout
was used always, so stderr was never visible in test results.
This uses the correct local variable, not the stdout from outer scope.