I tried reproducing it, but after 57 runs this didn't happen once to me ...
being under attack should not matter at all, nothing in the code makes sense to that.
Can you get me a GIF or a printscreen when this happends?
Also check the logger please.
I'll be running it some longer, try to get the issue.
Khaleesi