Fix use of uninitialized var (backport from trunk).