fix #165 invalid propagation of node change in cptcomponent

This pull request contains a fix for #165 (which is very similar to #143).
The fix done in #147 for `cpttemplate.js` is now applied in this pull request to `cptcomponent.js`.