As many have said, both are DB fouls, and you need to revert the game back to that point. Things to remember:
(1) Only fouls that could occur after the encroachment are of the personal foul/USC family. block in the back, holding and incidental face mask aren't members of that family.
(2) If the clock started because the timer thought the zebra knew what they were doing, time should be put back on. This might help to calm the frenzied masses that what they just saw was really an optical illusion. Easy task ,if following a free kick, as crew probably jotted down time of score. More of a challenge on a scrimmage down, where crew may have to guess.
(3) Go easy on the non-tweeters, I had much rather this occur than in inadvertent whistle. We can always rewind this, an IW never has a happy ending. In pregame, I stress let the play go if unsure to shut down (was kick muffed by R, recovered by K
or
caught and fumbled by R and advanced by recovering K) as it is much easier to correct then the dreaded IW.