I'm not sure if the regs cover this situation specifically. But here's my view.

If the line that he "snagged" was attached to a hook that was legally positioned, i.e., inside the mouth, then I would say it's a legally caught fish. If the hook had been located on the fins, the side, or anywhere else, then retaining this fish would be illegal.

The position of the hook is the determining factor.