unit test for #3049