HHH-8323 Add test case that tries to replicate issue