Added a regression test for #1380.