Agree totally chicken and egg... But what is the player celebrating then? People dont spontaneously celebrate nothing...But on the flip side you can't then be penalised for celebrating a goal before it has happened. Celebrating a goal by removing your shirt is an offence, it cannot be an offence if the goal hasn't happened yet. Chicken and egg.
This came up before a few year as ago as a pro player actually did it in a game. I'm pretty sure the consensus was allow the goal and caution for the celebration. You technically could caution for USB and disallow the goal, but the caution certainly couldn't be for a goal celebration as you'd be penalising something that hadn't yet happened. All you could really do is use the catch all "shows a lack of respect for the game".