Add test for issue 3400
Merge pull request #2501 from skirpichev/3400-test

Add test for issue 3400