More tweaks for bug #8161.