Fixes a bug in removing Node from SubLayer.