This block can be simplified quite a bit as we don't need to iterate the members object, just the `newMemberIds` and `updatedMemberIds` individually.