Second, you can still generally invoke the 5th amendment during testimony even if you already claimed someone else did it. You aren't under oath until said testimony, so it still protects against you having to choose between committing perjury or self-incrimination, and doing so cannot be used as evidence of either.
And you plead the 5th after going under oath. And you can't just plead the 5th to any question. If the prosection puts you under oath and asks you your name, you can't plead the 5th to that
5th amendment protections can include questions of identity, if the question of identity is relevant for incrimination. Like, if the government has a warrant for "Joe Smith", you're not required to testify whether that's you. It's usually a waste of time since could just prove it with the non-testimonial evidence that lead to your arrest, but the protection does exist.