Corrected usage of get_record_sql(), cf.
https://github.com/ndunand/moodle-mod_choicegroup/pull/16#issuecomment-17475277