MDL-35958 mod_data: backport of MDL-34448 members of seperate groups can see database entries for other groups.
Merge branch 'mdl19_MDL-35958' of git://github.com/danmarsden/moodle into MOODLE_19_STABLE