I think this actually happened to me once in War of Magic, but it was the other way around, the units belonging to the AI. This may sound odd, but, what if a perk would added, like "Great loyalty" or something, that actually enabled this to happen on purpose?