[mms] Fix advanced search in all mailboxes if virtual folders or remote accounts exist (Bug #13384).