Fixed a cppcheck error. Refs #9933.