Fix splitWithTail to insert the tail immediately after the outer loop. (#37941)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37941
Differential Revision: D21429733
Pulled By: resistor
fbshipit-source-id: 12094d990c11da8b44f32a52aa5e50b3f3575145