Added tests for #1376 and a file needed for the tests.