More work on bug #4663.