Play is stopped during the routine course of play and in this example the restart is a throw in for Team A. It is discovered prior to the throw in that a team has too many players on the field. The Referee deals with the extra player appropriately and play is restarted with Team A throwing the ball in, regardless if Team A or B had the extra player.
Now change the example and Team A scores a goal. It is discovered prior to the restart that Team A had an extra player on the field (rostered player, not an outside agent). The Interpretation of the Laws of the Game and Guidelines explains how to handle this situation except for the restart. Play was stopped because the ball left the field of play (below the crossbar and between the posts), not because of the extra player.
I feel the restart should be goal kick because play was stopped due to the ball leaving the field of play over the end line, last being played by the attacking team. The fact that the ball entered the net is nullified by the presence of the extra attacking team member. Is this the correct restart?
USSF answer (June 2, 2010):
Your reasoning is almost impeccable. The ball was out of play, ostensibly awaiting a kick-off for the goal, when it was discovered that the extra player existed. After the referee has cautioned and removed the extra player the correct restart is a goal kick.