Extra allocation in @thread loop in v1.2

Just guessing, but it could have something to do with the use of invokelatest here:

https://github.com/JuliaLang/julia/blob/c6da87ff4bc7a855e217856757ad3413cf6d1f79/base/threadingconstructs.jl#L71

which was introduced in https://github.com/JuliaLang/julia/pull/30838.