Add test for #9054.

The bug itself is no longer present.