Cherry-pick and fix Toddi's commit.

  Which was giving git endless confusion on merge.