Not quite a bug, but a flaw in the AI's strategy. The AI will cast Sacrifice/Retribution on Boss units, giving the player the win. Also, the AI does not check for immunity before attacking. I often have a skeezick alchemist absorbing the attacks from Maxx in the final battle of his campaign.