fixed ast building sync issue for selection nodes
test case for selection node re-exec
Merge pull request #2634 from Steell/selection-fix

Fix for Selection nodes not remaining in sync with Document