[Xml] Fixed crash caused by shared project support

BXC21487 - Crash closing a text editor which is working on an xml file