Role: apply_when: email exists (cant figure it out)

Im trying to have a role that applies when user has a email address.
But im getting
error executing match expression: invalid document: must either be a boolean expression or a literal document

with the following rule:

  "apply_when": {
    "user_id": "%%user.id",
    "%%user.data.email": {
        "%exists": true
    }
  },

It seems to be what is suggested here:

But it does not work for me.

Here is the full rules:

    {
  "roles": [
    {
      "name": "owner",
      "apply_when": {
        "user_id": "%%user.id",
        "%%user.data.email": {
            "%exists": true
        }
      },
      "insert": true,
      "delete": true,
      "search": true,
      "read": true,
      "write": true,
      "fields": {},
      "additional_fields": {}
    }
  ],
  "filters": [],
  "schema": {}
}

Just for reference: I found that you get this error when mixing document fields and %%user expansions in the same expression. It’s somewhat weird because the docs use a similar example:

{
  "owner": "%%user.id",
  "%%request.remoteIPAddress": {
    "$in": "%%values.allowedClientIPAddresses"
  }
}

But anyway. I found that this Apply When was not working:

{
  "organizationId": "%%user.custom_data.organizationId",
  "%%user.custom_data.roles": "user-admin"
}

and when I changed the field reference to %%root.[field], it did work:

{
  "%%root.organizationId": "%%user.custom_data.organizationId",
  "%%user.custom_data.roles": "user-admin"
}