Deduplicate library data when generating library dependencies