Test for bug #3788.