When I've had this happen, I think it was because I was trying to reply to or view messages from an outdated page. Like the details of the message had changed because other messages had come in and the previous link wouldn't allow me access. It doesn't tend to happen if I refresh my inbox tab, right click on the message and reply there (or right click, bringing up another reply tab).