Fixed by MDEV-15902, just added the test case for this issue.
Attach a file by drag & drop or click to upload