hook_civicrm_aclWhereClause not called when removing contacts from group
Scenario 1: User has both "CiviCRM: view all contacts" and "CiviCRM: edit all contacts" not enabled. User clicks Contacts | Manage Groups, clicks the Contacts link for a listed group, selects a contact and chooses "Group - remove contacts" from the Actions dropdown. hook_civicrm_aclWhereClause is called (and returns true) several times and the operation is successful as expected.
Scenario 2: Same user as above views the Groups tab on a contact record, clicks "Remove" for one of the listed groups, and clicks "Continue" at the confirmation prompt. A error popup appears saying "API permission check failed for GroupContact/delete call; insufficient permission: require access CiviCRM and edit all contacts" Only after this is hook_civicrm_aclWhereClause called (verified by breakpoint at the entry point), but the remove operation has already been blocked.
Tested on CiviCRM 5.15.1, Drupal 7.67
Untestable on demo site as it requires hook installation.