Added regression tests for #3381