added a testcase for #365

- refs #365, #308