Add test for bug #2901