Strange bug in battle

After killing some enemies with Whirlwind (can’t remember which ones), my creature cast Whirlwind on its own team about 15 times.