Fix tautological comparison.

(cherry picked from commit 09eeeaab4e5b80628d19ede0586be9ad00be2328)