Add test for #21565.

Thanks to @aaugustin. I can't get spatialite working either so let the
CI see if it works.