REFACTOR: removes use of undeclared variable (PR #9682)

GitHub