I've fixed it!!
God-Emperor was spot on with his guess. The solution is actually quite simple - I've moved the code from CvTeam and into CvTeamAI. It's now inserted as part of AI_doTurnPost() function and it works a perfectly!
In fact this is even better than hoped, as now the code perfroms the check every turn and picks up all AI's - not just those who have a newly conquered vassal. This givs me much more options in terms of performing checks to ensure the ai makes good strategic decisions.
Magic! Thanks to Red_Key, Tholal and God-Emperror for all your help with this one.