Unit test for #4172