7.x.back ports

Preliminary work for de-dupe.