Yes, it's a bug. It's only happened to me once. As an interesting twist, I loaded a saved version and before the AI attacked I ended the open border agreement, thinking this would force the units to move out of my territory. Instead, it moved them two spaces closer to my capitol. Then, they...