AssignIf: Improved handling of function calls