fix op-equals operations and improve argument handling for user defined functions

A stupid error was causing op-equals operations (+=, *=, etc.) to fail. Argument checking for user defined functions was also being performed in a silly fashion that lead to inaccurate error messages.