Index: comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.742
diff -u -r1.742 comment.module
--- comment.module	21 Jul 2009 21:48:24 -0000	1.742
+++ comment.module	25 Jul 2009 01:07:54 -0000
@@ -1291,6 +1291,18 @@
   if (!empty($comments)) {
     module_invoke_all('comment_load', $comments);
   }
+
+  // Ensure comments queried by cid are returned in the same order they were
+  // requested.
+  if ($cids) {
+    // Remove any invalid nids from the array.
+    $cids = array_intersect_key(array_flip($cids), $comments);
+    foreach ($comments as $comment) {
+      $cids[$comment->cid] = $comment;
+    }
+    $comments = $cids;
+  }
+
   return $comments;
 }
 
