// Seed the scoped parameters.
ApiCallScopeUtils.seedSharedParams(
apiCallScope, msgBundle, 0 /*use msgBundle locale's direction, ltr if null*/);
// Do the rendering.
TemplateRegistry cachedTemplateRegistry = isCaching ?
getCachedTemplateRegistry(Pair.of(msgBundle, cssRenamingMap), doAddToCache) : null;
// Note: cachedTemplateRegistry may be null even when isCaching is true (specifically, if
// doAddToCache is false).
if (cachedTemplateRegistry != null) {
// Note: Still need to pass msgBundle because we currently don't cache plural/select msgs.