Include upstream fix for bug 1985561
From a comment on the bug:
This is a regression caused by rewriting the duplicate checking code
to be more aggressive when looking for duplicates when using tail-end
packing. In particular a file doesn't now have to be the same size
to be considered a (partial) duplicate.