slotti: You know that what you call "Deleting" is in fact "Set the DELETED flag" only, and that "Expunging" is something else? I don't see a bug with the IMAP behaviour at all, because that is how IMAP exactly works.
I believe there is a setting in preferences of the email client to remove emails upon delete. You may not have it checked.