test for issue 1786