Problem with rules and Gmail folders.

I have been having a problem with moving messages to a folder using a rule that I created with my Gmail account. The rule is intended to move email from one of a number of senders to a subfolder of my Gmail inbox. The rule did not work, and showed error dialogs complaining that the folder does not exist (it does!). I have since disabled, then deleted the rule, but the error messages still pop up on starting eM Client!

Here’s the messages:
Title: Synchronization of account (gmail address)
Body: Failed to upload message (message subject name)
Message wasn’t uploaded to IMAP server because the folder “Inbox/AAI” doesn’t exist on the server anymore.
Which action do you want to take?
Create folder / Skip Upload

If I skip upload, the error is shown for several other messages. If I click create folder, I see the following in the Operations Errors:

(email address): An error occurred
[IMAP] Unable to upload message (message subj) to folder “Inbox/AAI”. ([ALREADYEXISTS]) Folder name conflicts with existing folder name. (Failure))

Please help! I like this software a lot, otherwise…

the problem lies on the server side. We recommend you to create a new folder via browser.

Well, I couldn’t create a folder in the browser, because it already existed!

The only way I found to work around this was to remove my account, then add it back again.