I did a little research and it looks like setting the path on a Dijit/Tree should return a deferred that you can hook into instead of relying on the timer loop. I hope that's still the case with the deprecation of Tree.attr().  https://bugs.dojotoolkit.org/ticket/11304