Add test case based on #1238