While I cannot test currently, I can only guess. But three things I would change.
Dont use !!BM:C better use !!BM:M to apply a spell to a stack.
Second: the variable v1357 is never reset. So after every action taken by any stack, it will always try to cast something with BM:C. This cannot work from my understanding and probably causes the glitch.
The function call is not needed and can be deleted completely. The !?BG1 Trigger is also not needed, depending on when you want to apply the Blind spell.
!?MF is enough.
And you have several unnecessary calls in your script, well ERM is difficult :D