flatten tree so we can insert a tree in a batch for digger level
2.1.0