backport of fix to ensure theme config is set