PLFM-2238 Fix a bug with node tree update.
Optimize code; logic not changed.
Merge pull request #741 from eric-wu/develop

PLFM-2238 Fix a bug with node tree update.