Knowing Baelish that was probably lurking around in the back of his mind somewhere. I just don't think at that moment in time he needed to since I think he thought Robert was just too stupid to catch onto anything Petyr had planned. Now with Ned he tried to help, Ned was just too honorably dumb to do what Petyr told him to do and the last thing Petyr is going to do is back the wrong horse.
Uh, that's not what happened. LF was trying to set Ned up the entire time. Let's review what happened.
LF had Lysa poison Jon Arryn, knowing that the probable outcome of Arryn's death is that Robert asks Ned to go to KL, a place that Ned neither wants to be nor is suited for.
He then had Lysa send a secret note to Ned's wife telling them that she suspects the Lannisters murdered her husband. Thus further ensuring the dutiful Ned will go to KL to find out what happened to his friend, and makes Ned predisposed to be suspicious of the Lannisters, the other great power in KL.
He then feeds Ned just enough information (like taking him to see Gendry) to make Cersei paranoid about what Ned will find out, setting the Lannisters against the Starks.
He further sets the Starks against the Lannisters by lying about the dagger, which he says belongs to Tyrion when it doesn't. Making the Starks determined to take down the Lannisters.
When Ned resigns his handship and is about to depart KL, LF delays it by having Ned visit his brothel about another of Robert's bastards, thus ensuring that Jaime Lannister has the opportunity to find Ned before Ned could leave the capital, Ned gets injured and is stuck in KL.
Tells Ned he bribed the city watch in his favor, but really bribed them to back Cersei during the confrontation in the throne room.
LF set Ned up every step of the way, there is no "he tried to help him" at any point. Actually he set both Ned and Cersei up, the Lannisters and the Starks were both severely damaged from that conflict.