Fix rendering optgroups.