Index: mail/mail-stub-exchange.c
===================================================================
--- mail/mail-stub-exchange.c	(revision 1306)
+++ mail/mail-stub-exchange.c	(working copy)
@@ -43,7 +43,7 @@
 #include <exchange-hierarchy.h>
 #include <mapi.h>
 
-#define d(x)
+#define d(x) (x)
 
 #define PARENT_TYPE MAIL_TYPE_STUB
 static MailStubClass *parent_class = NULL;
@@ -190,9 +190,13 @@
 	MailStubExchangeFolder *mfld = value;
 	int i;
 
+	d(g_print ("%s:%s:%d: freeing mfld: name=[%s]\n", __FILE__, __PRETTY_FUNCTION__, __LINE__,
+		   mfld->name));
+
 	e_folder_exchange_unsubscribe (mfld->folder);
 	g_signal_handlers_disconnect_by_func (mfld->folder, storage_folder_changed, mfld);
 	g_object_unref (mfld->folder);
+	mfld->folder = NULL;
 
 	for (i = 0; i < mfld->messages->len; i++)
 		free_message (mfld->messages->pdata[i]);
@@ -1610,6 +1614,13 @@
 		g_warning ("update_tags: %d", status);
 }
 
+static void dump_tag_update_values (GQuark key_id, gpointer data, 
+				    gpointer user_data)
+{
+	d(g_print ("Dumping tag_update_values: \n"));
+	d(g_print ("Key=[%s], value=[%s]\n", g_quark_to_string (key_id), data ? (char *)data):"{NULL}");
+}
+
 static gboolean
 process_flags (gpointer user_data)
 {
@@ -1622,6 +1633,12 @@
 
 	for (i = 0; i < mfld->changed_messages->len; i++) {
 		mmsg = mfld->changed_messages->pdata[i];
+		
+		if (!mmsg->href) {
+			d(g_print ("%s:%s:%d: mfld = [%s], type=[%d]\n", __FILE__, __PRETTY_FUNCTION__,
+				   __LINE__, mfld->name, mfld->type));
+			g_datalist_foreach (&mmsg->tag_updates, dump_tag_update_values, NULL);
+		}
 
 		if (mmsg->change_mask & MAIL_STUB_MESSAGE_SEEN) {
 			if (mmsg->change_flags & MAIL_STUB_MESSAGE_SEEN) {
