This actually happened to me yesterday, I figured it out but don't know if my problem is the same as yours...
Basically, it showed up after I had clicked on a link in my email to reply to a message...In the meantime, another message (from someone else) had come in, burying the message I was replying to deeper.
So, because I clicked on the link instead of visiting the message thread directly, it rendered the message "unread" even though I replied. After I visited that message thread & scrolled down to the latest message, it marked everything "read."
All this to say, if you find you are replying to messages via the link in your email, that may be causing the "unread" issue.

Hope this helps someone!