Add fix for MDEV-7369

See also https://mariadb.atlassian.net/browse/MDEV-7369