Adding a regression test for PR17578. It is marked xfail until the bug is fixed.