Really? That's odd. I'll give that a look and see if I can't replicate it and come up with a fix.
EDIT: I was able to replicate it. Going to test more and find out why.
EDIT 2: There we go! It was checking the wrong variable. A fix for this issue will ship with the next update. It's very good that you found this issue because another upcoming enemy will have a similar gimmick! Thank you for the help.