Fix #1654
Test case for #1654
Merge pull request #1655 from sjinks/issue-1654

Fix #1654