Improve error messages mentioning parameters instead of arguments Closes GH-5999
Fix pass by ref error for named params