Test case for #1862