Yeah that’s part of it. The bit in the show where Jaime and Ned talk during the feast and Ned says “you served well, when serving was safe” isn’t from the books, but I think the sentiment is probably there. So if Jaime had acted the moment Aerys had called for the murder of a Lord Paramount, I think it would be seen as a selfless and idealistic act, as opposed to being seen as part of the Lannisters’ switching sides.
I also think the method mattered. If Jaime had arrested Aerys instead of killing him, there would have been an argument that Jaime was fulfilling his oath as a knight to uphold justice and defend the innocent, and that Aerys’ fate would be in the hands of the law. If Aerys was armed, there would be at least the argument that it was an honorable duel. But killing an unarmed man, regardless of the other circumstances, is seen as dishonorable.