Haha! Excellent, well spotted! Exactly the same issue here - I'll update the bug tracker with your findings. Staff where the only people who were members of groups with parenthesis in the name
I literally am chuckling in response to how frustrating this was and how simple the solution was.
Absolutely brilliant. Thanks Steve I'm sure this is going to help a lot of people!! I don't know how useful it would be for you as you sound like you have things sorted your end - I'm going to put a post out very shortly on how to get courses (subjects) our from a School Management System into moodle automated style!
Do you think you could add a 'me too' to the bug tracker: https://tracker.moodle.org/browse/MDL-43430 that way hopefully the devs can get this issue fixed and we can have groups with parenthesis in! As the vast majority of my 2000 groups + have parenthesis in!
Also thanks Inaki for all your help and code!