Add test for #2542