BUG-509: improve safety of MutableDataTree