Just to follow-up and post for the benifit of the community, this issue has been resolved:
In order to query the security groups, please make sure that you have the permissions correctly configured on the service account you are using.
Note that each user object has to be a direct member of a security group for the filter to work.