--- ./src/imap/cmd-list.c	2011-03-04 19:53:01.000000000 +0100
+++ ./src/imap/cmd-list.c.new	2011-03-07 22:31:25.000000000 +0100
@@ -929,10 +929,13 @@
 	}
 
 	if (lsub) {
-		/* LSUB - we don't care about flags */
+		/* LSUB - we don't care about flags except if
+		   tb-lsub-flags workaround explicitly set */
 		ctx->list_flags |= MAILBOX_LIST_ITER_SELECT_SUBSCRIBED |
-			MAILBOX_LIST_ITER_SELECT_RECURSIVEMATCH |
-			MAILBOX_LIST_ITER_RETURN_NO_FLAGS;
+			MAILBOX_LIST_ITER_SELECT_RECURSIVEMATCH;
+	if(cmd->client->set->parsed_workarounds &
+           WORKAROUND_TB_LSUB_FLAGS == 0)
+		ctx->list_flags |= MAILBOX_LIST_ITER_RETURN_NO_FLAGS;
 	} else if (!ctx->used_listext) {
 		/* non-extended LIST - return children flags always */
 		ctx->list_flags |= MAILBOX_LIST_ITER_RETURN_CHILDREN;
