ENGINE-2005: fix the NPE
ENGINE-1989: Add to test which show that the problem is already fixed
ENGINE-2023: roleId and groupId is now used when searching profile
members for a role, a group or both