Fix another off-by-one bug that was introduced while fixing the others.