mistycoven: It's not about whether GOG puts the "owned" label on the game in the store or not. If your account owns the game, the "Add to cart" option becomes "Buy as a gift".
Being part of a collection doesn't change that. In an ideal world, you'd be correct. It's supposed to be like this, but in reality it's not perfect.
Ennson is actually correct: GOG's database doesn't always "know" if you already own some content of games, and you can indeed purchase by mistake something you already own.
Darksiders Blades & Whip Franchise Pack Doesn't flag
Darksiders III Deluxe Edition nor
DLC Darksiders III - Digital Extras DLC.
Frostpunk GOTY Doesn't flag Season Pass DLC.
Stasis Bone Totem Supporters Pack DLC Doesn't flag Soundtrack and Artbook DLCs.
This War of Mine Complete Edition Doesn't flag Stories Season Pass
And you can by accident fully re-purchase these missed products without warning (add to cart) because the matching is insufficient. Blame GOG or the publishesr/devs if you wish, but this is only a mere fraction of examples where owning a "complete" version doesn't guarantee having all the individual stuff properly flagged.
This is a word of caution: don't take GOG's word that you don't already own things. Especially DLC stuff.