He did all that while playing the ball though. Worst case scenario if you call hands to the face you call DPI, penalties offset. Going off a hunch, the reason the flag was picked up was probably because after the fact the refs decided the ball wasn't catchable because of the defenders position to the pass.
What's wrong was that they called the foul then reversed it. I have never seen that happen with a penalty in all the football games I've watched. That's what's wrong with the situation. I've seen flags picked up but the refs powwow then pick it up and say there was no foul for X on the play. That's poor officiating.