Make `createCompatConfig` theme mappings safe to spread when a namespace returns a string (#20399)