Speed up getting dynamic strings in AddUISettingsToDom

The first pull request was missing the second "topic" on line 257.