[Intl] Fixed a few bugs in TextBundleWriter