It was the correct call. I think it's kind of dumb though.
FOUL ENFORCEMENT ON RUNNING PLAY WITH POSSESSION CHANGE
Article 13 When a defensive foul occurs during a running play (3-27-2) and the run in which the foul occurs is followed by a change of possession, the spot of enforcement is the spot of the foul and ball reverts to offensive team. See 14-1-12- Exc. 5.
Exceptions: (1) When the spot of a foul is in advance of the spot where the offensive player lost possession, the spot of enforcement is the spot where player possession was lost and the ball reverts to offensive team.