Index: privatemsg.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/privatemsg/privatemsg.module,v
retrieving revision 1.70.2.30.2.91.2.105
diff -u -p -r1.70.2.30.2.91.2.105 privatemsg.module
--- privatemsg.module	7 Dec 2009 16:27:29 -0000	1.70.2.30.2.91.2.105
+++ privatemsg.module	31 Dec 2009 08:32:04 -0000
@@ -1254,11 +1254,13 @@ function privatemsg_sql_messages(&$fragm
   }
   // Only load each mid once.
   $fragments['group_by'][]    = 'pmi.mid';
+  $fragments['group_by'][]    = 'pm.timestamp';
+
   // Order by timestamp first.
   $fragments['order_by'][]    = 'pm.timestamp ASC';
   // If there are multiple inserts during the same second (tests, for example)
   // sort by mid second to have them in the same order as they were saved.
-  $fragments['order_by'][]    = 'pm.mid ASC';
+  $fragments['order_by'][]    = 'pmi.mid ASC';
 
 }
 
