Fixed duplicate if error reported by cppcheck. Refs #8881.
Merge branch 'feature/8881_fix_dup_if' into develop