cpp: xerces: Correct data caching in the entity resolver