Test case for #1335