Fix uninitialized var error. Fixes #8667.