https://gist.github.com/cweagans/e9af2462d56aaba203c6b71fba69709f is a quick fix for this problem. Not sure if it’s the right thing though. If you’re using Composer to manage your WordPress installation, you can add the patch to your composer.json, require cweagans/composer-patches, and have the patch applies when you do a composer install. It’s a small enough patch that you can probably just make the changes manually if needed as well.