Test case for bug#2848.