Test that would have caught a recent test failure

The bug itself was fixed in e5118295d39f3183f55956026f1e5f457a0520bd