RE: Probably was offside According to the FIFA rules pp65 diagram 12, a shot by a team mate which rebounds off an opponent to an attacker who was previously in an offside position then the attacker was offside. So the poor old ref got it right.
RE: were the two offside goals offside? Just to say the defender definately did get a flick on. I always thought you couldn't be offside if it came off an opposition player. He was offside when the ball was played i think but linesmen don't flag til they get the ball now...its really confusing