Reapply r108794, a fix for the failing test from last time.