I've had this before, too. I've been explicitly told to capture a settlement (by force), I've done so, and then I've been informed that another faction occupies the settlement. It doesn't happen often, but it does happen.