Re #9030. Added a unit test