internal/lsp: findIdentifier always return an error

Fixes golang/vscode-go#1522

Change-Id: I9da0e5486e1494cf7948beefa26f57d89d5b3933
Reviewed-on: https://go-review.googlesource.com/c/tools/+/322651
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
diff --git a/internal/lsp/source/identifier.go b/internal/lsp/source/identifier.go
index 77f4964..9fb3daa 100644
--- a/internal/lsp/source/identifier.go
+++ b/internal/lsp/source/identifier.go
@@ -276,7 +276,7 @@
 
 	declPkg, err := FindPackageFromPos(ctx, snapshot, result.Declaration.obj.Pos())
 	if err != nil {
-		return nil, nil
+		return nil, err
 	}
 	if result.Declaration.node, err = snapshot.PosToDecl(ctx, declPkg, result.Declaration.obj.Pos()); err != nil {
 		return nil, err