Fix deadlock when there are no modules

Change-Id: Ibfc1190f2b5ac3c3445d40f1b5dd0cd782e63dfd
diff --git a/context.go b/context.go
index 9fea1db..da4643a 100644
--- a/context.go
+++ b/context.go
@@ -977,8 +977,7 @@
 		}
 	}
 
-loop:
-	for {
+	for count > 0 {
 		select {
 		case doneGroup := <-doneCh:
 			for _, parent := range doneGroup.reverseDeps {
@@ -988,9 +987,6 @@
 				}
 			}
 			count--
-			if count == 0 {
-				break loop
-			}
 		}
 	}
 }