cmd/bundle: fix nil dereference panic

In the loader API, (*Config).Import, like go/build, accepts relative
paths such as ".", but (*Program).Package requires the exact path of a
loaded package.  So, to find the package identified by "." we must
look at the set of packages actually loaded, which in this scenario is
guaranteed to be a singleton.

(This is a definite weakness of the loader API.  In the more general
case where two or more packages are imported, it's tricky to correlate
the calls to Import with the package(s) each call actually loads.)

Fixes golang/go#20751

Change-Id: I925e969c9b4f4d6b6344c16f156b47857436d70a
Reviewed-on: https://go-review.googlesource.com/46414
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
1 file changed