Kostya,
I just saw this race condition:
I am in Aquamail, in the Inbox of one of the accounts in the message list view, pulling down to refresh the Inbox. After connection to the server, AM shows a new message, I delete ["Permanently delete"] it right from the list, (and IIRC, go to a different app) and then I see a system notification for that message.
It's not a big deal, - but I thought you might want to know about it.
Just in case it matters, - it's an IMAP account.