Assigning both primary style and style name is now handled correctly (#12190)

Change-Id: Iceba6be78a49bc1aacf837b9fcd9790749be01c0