REFACTOR: removes unreachable code (PR #9665)

GitHub