Fixing a bug in setting the type of local variables as arguments confusing some optimizations