Why does my rear derailleur keep breaking? I upgraded my rear-mech with a new cassette, chain and new cables a few weeks ago since then i've mangled two rear mechs!  

Both times I've just been riding along; not in a big gear; not at the extremes of the cassette, the mech just seems to get caught on something (the chain?) and bends and snaps!

I've got to buy a 3rd mech and I'm wondering why it's happening, is it just bad luck?

The mech I replaced (an ageing XTR) I'd had for years without any miss-hap but now I've mangled two XT mechs, one was a Shadow and the one prior to that was a standard.

Any sugggestions?
Did you change the chain after the first derailleur broke?  If the same chain was on and you're positive the derailleur didn't connect with the spokes, then the chain is a likely culprit.  Another thing to watch out for is loose pannier straps (or anything else that could get caught in the chain and take out the derailleur).