Add regression test for #8103