internal/imports: handle out of range panic in modInfo
internal/imports: handle out of range panic in modInfo

Fixes golang/vscode-go#882

Change-Id: If238f61be5653c159293a811bf9728029701de48
Reviewed-on: https://go-review.googlesource.com/c/tools/+/267125
Trust: Rebecca Stambler <d7cf11e5f299d88ea8348366a9fc4f7c335c3afa@golang.org>
Run-TryBot: Rebecca Stambler <d7cf11e5f299d88ea8348366a9fc4f7c335c3afa@golang.org>
gopls-CI: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
TryBot-Result: Go Bot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Heschi Kreinick <e89ab2b172855aa0ad01c40c4d8a3535a61ac68a@google.com>

golang/tools,golang/tools,golang/tools,golang/tools,golang/tools