I don't think Tom's being replaced was any indication he was a bad consigliere; I believe that Michael truly needed him to perform his services to the family as an attorney and that's why he was replaced, though at the same time, he was keeping as bible that family motto: "keep your friends close and your enemies closer" and that applied to Carlo in many ways. And besides, Tom was advising Michael though not in that capacity (hint: the scene during the Vito's funeral).