Merge repoman fixes from trunk r5660:5661 and r5665:5669.