A possible fix for
https://github.com/ndunand/moodle-mod_choicegroup/issues/31