Added a unit test that confirms the issue #1381.