Add support for OptionGroups to checkRequiredOptions