REFACTOR: removes dead code (PR #9721)

GitHub