godoc: fix potential index out-of-bounds error
godoc: fix potential index out-of-bounds error

R=golang-dev, bradfitz, dsymonds
CC=golang-dev
http://codereview.appspot.com/5683072

tav/go,tav/go,tav/go,tav/go,tav/go,tav/go,tav/go