Fix off-by-one error in new TOC logic, which was leading to bogus HTML.
Fix off-by-one error in new TOC logic, which was leading to bogus HTML.

(cherry picked from commit 1ea444d)

istio/istio.io,geeknoid/istio.github.io,geeknoid/istio.github.io,ZackButcher/istio.github.io,linsun/istio.github.io,istio/istio.io,istio/istio.io,linsun/istio.github.io,ZackButcher/istio.github.io,linsun/istio.github.io,geeknoid/istio.github.io,linsun/istio.github.io,ZackButcher/istio.github.io,linsun/istio.github.io,geeknoid/istio.github.io,istio/istio.io,istio/istio.io,geeknoid/istio.github.io,ZackButcher/istio.github.io,istio/istio.io,istio/istio.io