One of Larry Page's earliest papers is about dedup. Google itself has published papers on email deduplication.
When Dropbox sees a dup, it does not upload the file at all and therefore you know there is a dup. If I understand correctly, Gmail always uploads the attachment. When there is a dup Google saves storage space. Users will never noticed any difference.
That just makes the potential privacy violation undetectable, though. Doesn't remove it in any way.