Yes, but then you give the yards and replay the down. So they are still hurt.
I just don't like the idea of a team getting the ball back in that scenario because of a penalty. It's far far far more likely to occur then for a team to get the ball back because they successfully executed an onsides kick.