Regression test
Fix #1315
Merge pull request #1325 from sjinks/issue-1315

Fix #1315