Ah, but what if the player commits two yellow card offences, meaning he shouldn't even be on the field of play, but then during the continuing play he actually goes and scores?
A player who should be already off the field despite the ref deciding to give him two yellow cards and throw him out...