A bug present in 0.41, and remains in r689:
On Eversmile, I've been able to create and reproduce a situation where 4 beetles are engaged in battle with a dwarf. 1 of them is doing nothing. It's not attacking, it's not fleeing, it's not hopping up and down. It is, literally, just standing there. It's not even animating.
Here's a Dropbox link to the save:
https://www.dropbox.com/s/oump5r034s...fx1g0000.zip?m
I caught this a few seconds before they murder the crap out of the dwarf and the AI returns to normal. The bugged bug is the one to the lower left. It seems to me it's trying to find a position from which to attack the dwarf. Since it can't due to whatever, it just stands there. Forever.