There's an old thread here about this. Not much there, though. A few people assuming it's macros (when, in this case, it wasn't), and no real resolution or fix.
If you are using <t>/<tt> macros, it's pretty much guaranteed to happen at some point. Individual macro lines are sent to the server one after another with not much processing. If you've got <t> and <tt> in the same macro, you're going to happen to hit it at exactly the right moment for the server to accept the <tt> and not the <t> while you've got a player targeted. And <tt> will be a monster, and curing a monster means curing yourself. I'm not sure if the new (as of 2.38) /macrolock command would help with that in any way.
If you're not using macros, it's a freaky mystery, and I don't think anyone's found a reason or a solution.