Prior to the major refactoring of groups in 2007 groups_get_group() took two parameters: the groupid and a boolean flag controlling whether to return the course id (see https://github.com/moodle/moodle/commit/1d68419596686b4ccac22c851d7ebdccbb379a0f#diff-2 for an example of the old code). This second parameter was removed but many hardcoded boolean references remained in the code. This wasn't a problem until 2.0+, when groups_get_group was rewritten to take three parameters: the groupid, an optional fields (default "*") passed back to the database call, and a strictness setting for the database call. All the functions which still have the hard-coded boolean second parameter are in effect calling groups_get_group and telling it not to return anything, which causes a stacktrace. The first known bug in the wild is MDL-26232 but a quick search with git grep found others.
Four references in total; patch here: https://github.com/mackensen/moodle/commit/94f6ea5c0842f48b1633996b9632326701b78254