`_precompilepkgs`: interactive progress display: fix unintended capture (#57932)
The variable `str` also exists in one of the enclosing closures. Use a
new variable, as was surely intended, instead of capturing and mutating
the `str`.
Improves the sysimage's resistance to invalidation.