Flacco is a solid runner and on a drive earlier in the game, he completed a 30 yard pass while running out of bounds; the defensive players have to have the chance to play actual defense. I was stunned it wasn't called, but only because they always call hits on the QB and not because he was so clearly out of bounds.
I agree with the rest of what you said - the 4th down PI isn't an issue if the 49ers had done anything on the previous 3 plays. I have no idea how they decided not to run the ball with Kaepernick there; I have to believe a roll-out pass/run option would have worked there.