If more than one type of hat is selected in the skills menu for one duplicant, the duplicant cycles through the animation as many times as a hat was selected but without any corresponding hat. When opening the skills menu again, no hat is assigned to the duplicant.
This mostly comes up when misclick, like giving a farmer the Farming hat, when I meant Crop Tending 1. If I let the animations cycle through, then open the skills menu to assign them again, it works fine.
Open Skills menu, on a duplicant with two or more mastered skills select each available hat, close the menu. After duplicant finished the hat animations, no hat is assigned.