It assumes midcast is right after you've started casting (pretty much as soon as the command goes through).
The problem stems from the fact that you can only change gear so fast, even with Spellcast running overtime to get you clothed quickly, it's just not possible in some instances.
You should be able to use a cast delay which may/may not inhibit your playing a little, depending on how early you like to cure (for me, it never was an issue because I overcured often, not by much but enough for a 0.3sec difference to never kill someone).
If you want to experiment with a cast delay to see if that helps, then add this into your cure rules:
Code xml
<castdelay delay="0.3" />
Play around with the value and you should get somewhere you feel suitable. If you want to doublecheck when your gear's changing, then add:
Code xml
<config debug="false"
showgearswaps="true" />
to the start of your XML file (you'll likely see something like that already).