Added testcase for #391