[1.7.x] Removed an unused variable.

Backport of 684e8a941b from master