unit test for issue #2345 on master branch