CRM-15495 - Fix CRM.utils.renderOptions to handle optgroups correctly