initial backport from gregors r5 optgroup patch
fix method name..
Merge pull request #74 from jdlx/core/rex_select/optgroup_backport

[rex select] optgroup backport (fixes #39)