Silence gcc warning. Thanks to Chris Stylianou.

Closes #8725.