Fix clang -Werror build break due to mismatched sign comparison.

Originally committed in r202985.