Update TreeElement.java
Merge pull request #23 from dimagi/ledger_iterate_performance

Fix for 1.3 compatibility issues