Had a bug today, in which an ally (someone who swore loyalty to me) switched sides and pledged loyalty to someone else. When this happened, even though they weren't loyal to me, I was unable to claim their farms and villages when my soldiers were on their un protected land.
At one point, their soldiers were able to attack my lands but I could not claim it back.