Another attempt to fix bug #3146.