Some more tweaks for bug #8365.