Reapply r188119 now that the bug it exposed is fixed.