fix a bug that unused nodes were not removed in a new extracted mesh.

Behavior of a Mesh class constructor has changed some time ago and it will not remove unused nodes any more.