Rebase linklog branch against master

Hopefully will be helpful when merging into the 2.5 branch.