I posted this on another forum before, so...
Did you forget that Itachi is(was) under a genjutsu called Kotoamatsukami?
His ''orders'' set by Kotoamatsukami were: 'Protect the Leaf!'
But!
Itachi doesn't kill Sasuke (who is a threat to the Leaf), doesn't that make Kotoamatsukami a failing...