[mms] Fix possible issue creating folder tree if multiple special mailboxes appeared in the same branch (Bug #12050).