Don't update primary stylename if it's already up to date (#11088)

Change-Id: I059d7ec83f8c4ae43d2ab6e2c80177675c6881d0