Stampede or Swarm is an interesting case because the tooltip is slightly imprecise. It says it deals 9 damage, but it really deals 3 bursts of 3 damage. Build Turret is the same: it says 9 damage, but ingame it deals 3 little shots of 3 damage each. This detail becomes important because Shell Shield reduces each of those hits by 5, so instead of taking 4 damage, you take 0 (you actually take 0 damage 3 times--ingame it will appear as "block block block"). And, Shell Shield gets to reduce the damage from Stampede before you multiply for the Stampede debuff, so it's (3-5)*2, instead of (3*2)-5.
The way the math is done really favors Shields. Any time an attack deals damage in separate bursts, the shield subtracts damage from each burst. Examples include Triple Snap/Flurry/Quills/Thrash, any DoT, Tail Whip, Alpha Strike and Pounce (these are interesting because the damage pops up in the UI as a single hit, but in the combat log you can see that it actually does two hits, and shields subtract from both), the bonus damage from Lightning Storm, and double-damage abilities such as Conflagrate or Early Advantage.
Sandstorm is extra amazing because it does all this, plus it shields your backrow pets the same way, which reduces most AoE down to virtually nothing.