Revert "Set parent_node and always copy datatype when assigned to code nodes."

This reverts commit a09c9e93af0d64b9331c274de573465fe070b722.

Fixes bug 709587.