Function redefinition fix

This PR fixes bugs when a function is redefined in a codeblock 
1. Redefine a function by changing its name
2. Redefine a function by changing its arguments
All statements using these modified functions must be re-executed.

http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-5179

@lukechurch  @ke-yu 
@monikaprabhu pls see the related LiveRunner test. 

Sure. We kinda do already have a standard.

When you can express it in a single statement, without any complex foobary, then use LINQ. When it takes multiple filters, can't be read in a single breath, or has side effects, stay away from LINQ.

I think I agree in this case that LINQ would have been the better option.