diff --git a/mail/message-list.c b/mail/message-list.c
index f5ed8c1..11d8816 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3302,10 +3302,13 @@ build_tree (MessageList *ml,
 					node = parent;
 			}
 
-			e_tree_memory_freeze (E_TREE_MEMORY (etm));
-
+			/* We have to set the cursor before we do the freeze/thaw cycle,
+			 * as the thaw will restore it to the pre-freeze value.
+			 */
 			e_tree_set_cursor (E_TREE (ml), node);
 
+			e_tree_memory_freeze (E_TREE_MEMORY (etm));
+
 			if (!can_scroll_to_cursor && table_item)
 				table_item->queue_show_cursor = FALSE;
 
