Someone else got this problem and confirmed that confusion was indeed in effect. I think it has something to do with this:
Thanks for the information, that narrows it down. I have had problems with confused before and have lessened the times this fucks up but clearly it is not done yet. It is an interaction between the plugin handling the confusion stat specifically and the one which manages enemy animations, I will have to look into it more. I suspect this happens when a confused enemy attacks itself and fails to hit.