Fortunately I have just stepped through in his save and it wasn't even that routine that was attacking! It was AI_goodie(), and the reason was a bug in the oddds calculation that caused it to think it had 99% success chances!
I'll push the fix later along with other changes for maintenance etc.
I strongly recommedn ALWAYS stepping through fixes in the debugger when you have a repeatable test case (like the save here) to vaildate that what is going on is what you thought, otherwise thinsg like different random number generation can lead to observed effects that are not for the reason you think they are.
I'll have to learn how to do that.