Index: mail/message-list.c
===================================================================
--- mail/message-list.c	(revision 35621)
+++ mail/message-list.c	(working copy)
@@ -3890,8 +3890,10 @@ regen_list_exec (struct _regen_list_msg 
 				   matter. So here just check whether the file was deleted and we show it based
 				   on the flag whether we can view deleted messages or not. */
 
-				if (!was_deleted || (was_deleted && !m->hidedel))
+				if (!was_deleted || (was_deleted && !m->hidedel)) {
 					g_ptr_array_add (uids, g_strdup (m->ml->cursor_uid));
+					printf ("preserving cursor_uid, because was_deleted:%d, hide_del:%d; had a search:---%s---\n\n", was_deleted?1:0, m->hidedel?1:0, m->ml->search);
+				}
 			}
 		}
 	}
