Fix regression on loading jit module from flatbuffer (#97190)
Summary:
https://fb.workplace.com/groups/pytorch.edge.users/permalink/1287477365455887
Root cause:
Introduced in D44106776. But this loop is wierd because class_dep can grow, so it cannot be replaced with c10::irange.
Test Plan:
Used model at `fbpkg fetch speech.tuna.milan.ondevice.en_us.transducer:6`
Then
`buck run xplat/caffe2/fb/lite_predictor:convert_model -- --model=$HOME/20230320debug/pytorchmodel.pt --output_name=/tmp/ffmodel.ff`
Differential Revision: D44234894
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97190
Approved by: https://github.com/larryliu0820