This might be a duplicate of HHH-12470 which was fixed and will be released in 5.2.18.
Try it with 5.3.1 or give it a try after 5.2.18 is released as well. If you cannot replicate it on the master brach, it means it's a duplicate and got fixed.