There’s no evidence that Comey would have lied if not for that tweet. Why would he? It’s entirely probable that at the time Comey told Trump that he was not personally the target of any investigation, he wasn’t. The investigation was still in its early stages at that time. That doesn’t mean that Trump would be immune from any investigation for all time, nor did it proclaim Trump innocent of any wrongdoing. If the trail led to Trump, then he would be investigated.
Remember that Nixon wasn’t the target of the Watergate investigation in the beginning, either. But he was when the trail led to him.
It’s interesting that Trump expended a fair amount energy demanding “loyalty” from Comey and questioning whether or not he was being investigated. That’s the sort of thing a guilty person does. If Trump is so innocent, why is he acting so guilty?