Internal/external users not properly set / filtered by API

We are on self-managed GitLab free EE, currently running 17.8.

Newly registered users are automatically flagged as external, except when their email matches a specific regex (admin settings > account and limit). Prior to the update, external users got the attribute external=true and people matching the regex got external=false. Now after the update, people matching the regex get external=null instead of false.

The problem now is, that an API call like /api/v4/users?exclude_external=true for some reason filters out accounts both with external=true and external=null, basically rendering it useless.

Either, there is a problem with setting the external flag to false with the regex in the admin settings, or the API is bugged and should not filter out accounts with external=null on a exclude_external call.