Instead of
- for the second loop 1) retrieve all assignees for that Project and 2) loop over that list of assignees and 3) in that loop check if the assignee has access
you can
- retrieve all assignees of the project, and include an xpath to limit to only assignees having access, and set the retrieve to only 'first'