There seems to be an issue with AI occupying provinces (not just raiding) of people they are not at war with and then often taking them prisoner. Included with this is foreign troops appearing as enemies when you are not at war with them nor hostile for any reason.