[functions] fixes a few shadowing warnings