Fix off-by-one error
Merge bug26492