codegen: parameter attributes on CFunction closures sticks (#41827)
When CFunction closures are created an extra argument is added to the
function signature for holding the closure.
Make sure that the parameter attributes on already existing parameters
are not shifted when adding that parameter.
(cherry picked from commit 08f342230e056c118dedd9889c558ebcbbb26603)