Re #10008. Added a unit test.