ParentId filter is not working in Group API

Hi All,

when I am running below code data is not coming only on the basis of userId but not on parentGroupId

#set($query = "%{SortBy = 'LastUpdate',SortOrder = 'Descending' ,ParentGroupId=157,UserId = $core_v2_user.Accessing.Id,GroupTypes='all'}")
#set($groupList = $core_v2_group.List($query))

ParentGroupId 157 contains only 4 subgroups and $core_v2_user.Accessing.Id is the members of  total 20 groups/subgroups.

for ParentGroupId 157 ,$core_v2_user.Accessing.Id is only the member of 2 groups out of 4 groups.

so as per the above code logic there should came only 2 groups in result set but I am getting all 20 records why?

please let me know the appropriate suggestion.