Add test for #387.