More work on bug #4663.
More work on bug #4663.