Hi! I did additional testing and converted the attached patch into a MR ready to be merged on the debian/latest branch and uploaded to unstable: https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests/68
Seems the experimental builds for MariaDB went OK. Let me know when is the correct time to upload this to unstable.