I have a problem with Mail in OS X El Capitan (10.11.5). If I archive messages from my Inbox, go to another folder, then back to my Inbox, the messages are there again. Quitting mail and starting it again doesn't solve this.. I rebuilt the mail database by deleting the Envelope Index files from /Users//Library/Mail/V3/MailData/, but that didn't solve the problem either.
ps I know there's a comparable thread on this forum, but it's specifically about Mail on the iPhone and Gmail.