Added tests for #1361