Test case for #2046