DynamoDS/Dynamo — pull request #2121 by ke-yu (2014-08-08 06:59:25+00:00)
Title: Fix watch issue when switch documents

This pull request is to fix [MAGN-4100](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-4100#).

There are multiple issues:
* A self assignment (e.g., ``var_1 = var_1;`` is generated in AST compilation. This kind of assignment which remove all dependencies on variable so that update stops working. Although essentially it is a language issue, rightnow the workaround is to remove this kind of assignment from AST nodes.
* For Watch node, in AST compilation there are two assignments are created. One is calling ``VMDataBridge.DataBridge()`` to register a callback in the VM, and assigning the return value to this variable. The other statement assigns input variable to this variable. The latter one removes previous dependency. So the fix is to assign ``VMDataBridge.DataBridge()`` to a dummy variable.
* When switch documents, as ``Family Type`` node is not executed, the downstream node will use a staled DB object. So the fix is to set ``ForReExecuteOfNode`` property to true.