Add testcase for #1026