LPS-42922 Add break to a loop in ResourcePermissionLocalServiceImpl