[jit] Fixed a bug in the pass that replaces cat with the variadic op (#61795)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/61795
Test Plan: Imported from OSS
Reviewed By: nikithamalgifb
Differential Revision: D29748785
Pulled By: navahgar
fbshipit-source-id: df5b84c35f007718c92a21a0b44a231e6d346918