cmd/go/internal/modcmd: fix sorting

Introduced in CL 120197

Change-Id: Ib776ea08efb16c7521430f837f560158d6fed897
Reviewed-on: https://go-review.googlesource.com/120597
Reviewed-by: Russ Cox <rsc@golang.org>
diff --git a/vendor/cmd/go/internal/modcmd/mod.go b/vendor/cmd/go/internal/modcmd/mod.go
index b84aacf..a24a105 100644
--- a/vendor/cmd/go/internal/modcmd/mod.go
+++ b/vendor/cmd/go/internal/modcmd/mod.go
@@ -495,7 +495,7 @@
 	})
 
 	sort.Slice(out[deps:], func(i, j int) bool {
-		return out[deps+j][0] < out[deps+j][0]
+		return out[deps+i][0] < out[deps+j][0]
 	})
 
 	w := bufio.NewWriter(os.Stdout)