I am playing through the Toradora visual novel, and the context is that Ryuuji had lost his memory and doesn't remember his own name. When his friend, Taiga, calls him "Ryuuji," he says:
I understand that he is saying: "Ryuuji," is that my name?
But I don't understand why よかった is used here. Usually I think of よかった as "thank goodness," "it was good," or "would have been good." This context doesn't seem to match up with the regular よかった that I'm used to seing. Or perhaps am I just over-thinking this?