Looking at this pretty awesome video of the CRS-6 first stage almost making it back to the barge, it sort of seems that if something could have steadied it just a bit, it would have been okay. Attitude jets are visible firing at the upper end of the stage at 6 seconds of the video. Does the tip-over point to an issue with the attitude controls, or just a matter of refining them?
If you watch the video again you'll see the main engine is gimballing - that is, changing the angle at which it points. It goes through a few sweeps as it attempts to correct itself.
There's a well known problem in physics, the "inverted pendulum" problem, where a body can be held with its upper end vertical, simply by controlling the movement of its lower end. (Try this at home by balancing a broom handle.) This is being done here by sideways deflections of the main engine.
In addition, there are the gas thrusters at the top which can help. (I suspect these assist in crosswinds but I'm not sure.)
What seems to be wrong here is the main engine - either its pointing angle went wrong or it didn't maintain the correct thrust while at an angle, causing the lower end to start over correcting.
Short answer: they need to do a bit more work on the software and on the understanding of the dynamic behaviour of the system (possibly including nonlinear behaviour in the rocket engine). The rocket probably already has everything else it needs to work.
If you ignore the engine in the video and instead watch the F9's body, you'll see it go through more than a full cycle of oscillation (counter-clockwise, clockwise, counter-clockwise), and those oscillations appear to be increasing in amplitude as it approaches the ground.
Motion like that is not typical of a controlled landing.
Thus, in the unlikely event the F9 was successful at avoiding a tip-over, it would have been by sheer luck, because the trend was one of losing control, not regaining it.
Until there is more information released on what caused the loss of control, it is not possible to say what would have saved this particular landing attempt.
The reported issue is that the valves controlling the Merlin 1D had some internal friction (Stiction) that meant it was slow to respond to computer requests. It was ordered to correct one way, was slow, so over-corrected. The computer ordered a correction to fix it, was slow, over-corrected the other way. Until it came in as you see.