The replay I watched this morning wasn't very conclusive. The ball could have hit the top of the wall or just above the padding. Not sure of the ground rules in St. Louis so I can't say either way. I would think that if a ball hits the wall and comes back in, it should be in play. St Louis has no yellow line denoting out of play vs. in play.
I do agree with Larry, I think the umpires should have let the play go on and not have ruled it a HR so soon. The ball hit and bounced right back to F8 and they were already ruling a HR before Pujols hit 2B.
Video