--- wpkg-0.9.7-test1/wpkg.js	Wed Mar 22 12:09:08 2006
+++ wpkg.js	Thu Mar 30 15:05:57 2006
@@ -1744,11 +1744,13 @@
             if (packageNode != null) {
 		// add package-id dependencies 
 		appendPackageDependencies(packageArray, packageNode);
+		if (!searchArray(packageArray, packageNode)) {
                 // add the new node to the array _after_ adding dependencies
                 packageArray.push(packageNode);
             }
         }
             }
+    }
 
     return packageArray;
 }

