jail: prevent a null derefence on array parameter assignment
The same variable was used as a counter for an inner and out loop.
Add a new one for the inner loop.
PR: 283934
Reported by: crest at rlwinm.de
(cherry picked from commit 6d9bc46cd7fc48ece597162d3ca413fc9d67b5f0)