[gopls-release-branch.0.7] internal/lsp: remove duplicated loop that copies IDs

This logic was duplicated as part of the invalid metadata CL.
I believe the loop on L1873 is the intended behavior.

Change-Id: I93ceb3da4045f0536be7dc9da7cecc4323e14a92
Reviewed-on: https://go-review.googlesource.com/c/tools/+/339112
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
(cherry picked from commit 45eff0fdb0da1630f095ee1fa953c9e57d8664eb)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/339096
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
diff --git a/internal/lsp/cache/snapshot.go b/internal/lsp/cache/snapshot.go
index c741885..a6139f5 100644
--- a/internal/lsp/cache/snapshot.go
+++ b/internal/lsp/cache/snapshot.go
@@ -1843,20 +1843,6 @@
 			shouldLoad: v.shouldLoad || invalidateMetadata,
 		}
 	}
-	// Copy the URI to package ID mappings, skipping only those URIs whose
-	// metadata will be reloaded in future calls to load.
-	for k, ids := range s.ids {
-		var newIDs []packageID
-		for _, id := range ids {
-			if invalidateMetadata, ok := idsToInvalidate[id]; invalidateMetadata && ok {
-				continue
-			}
-			newIDs = append(newIDs, id)
-		}
-		if len(newIDs) != 0 {
-			result.ids[k] = newIDs
-		}
-	}
 
 	// Copy the set of initially loaded packages.
 	for id, pkgPath := range s.workspacePackages {