Test for bug #3142, actually duplicate of #3262.