Yep. Offsides is determined by the second last defender or the ball, whichever is closest to the endline. Ordinarily, the keeper is the last man back so the second last defender is the last field player.
The refs got it right. The announcer, however, didn't have a clue.