Fix cppcheck scope error.

Refs #8598
Merge branch 'feature/8598_convert_to_yspace' into develop