Move dedup logic into update-chunk!