Yeah, it only happens in the Thorny arc (or whatever it's called). I remember watching that and going "Wait, they didn't know this until NOW? Huh.". It was also surprising, because it's not often we see Gintoki himself mentioning it, let alone boasting about it.