Fix off-by-one error in r260229.

Coverity CID:	1148955

(cherry picked from commit c5a69c830799245d9184a36db144d873fc05800d)