WC ping
You are talking about the difference between active and passive offside.
As has been mentioned elsewhere on thread, if a player is not in an ‘active’ attitude when the ball is played, meaning the ball is not being played toward him, offside is generally not given.
Hope that helps.
From my crude screen grabs it really does not look like an offside on the first head on because the player in the middle was onside and the lower player (#10) was so close it was an OK no call, IMHO.
The photo below is a grab of what seems to me to be the earliest point of the first head on off a Ghana free kick.
The bigger question for me is if the player (#10) hitting the shot that bounced off the defender's leg was offside at the time. I can't tell from the video if the goalie punched the ball to him or if it was headed over by his Ghana teammate.
I found the sideline video that I took the screenshots from here.
Thanks for the interesting post.