Pre-rendered select with mixed options and optgroup

Added handling of options without optgroup when one or more optgroups are present for pre-rendered selects
Fixed bug on pre-rendered select without optgroups
test for pr #87