I am having a very confusing problem in R where changing the local name of a function argument causes the code to break. The problematic name is not the name of any variable