creating an empty tree would fail in 3.0.6 - close #869