improvement for https://github.com/swayf/mongoose-path-tree/issues/6