The Russians got caught because they didn't compartmentalize enough. They re-used infrastructure for their separate operations (DCLeaks, Guccifer 2.0, spearphishing, hacks of DCCC and DNC), confirming they were all controlled by the same people
WL actually reached out to Guccifer 2.0 asking for dirt on Hillary, not the other way around. They specifically wanted drive a wedge between Hillary and Bernie supporters before the Democratic National Convention