Fix use of uninitialized variable (backport from trunk).