An earlier variant of the commit following this one introduced a regression for the behavior tested here, but did not fail any in-tree tests. So lets add an explicit regression test to make that easier to catch in the future.