It also works in R2009a when you modify the lines 28 to 31
You have to add a first argument 'v0' to line 83 as mentionned Martin Römpert ... but also for EACH line with uitreenode . It will prevent warnings in a standalone mode (MATLAB Compiler). These warnings tell you to add v0 to continue to use this undocumnted feature (uitreenode). I made this modification and now there is no warning at all when I expand my nodes.
First, add 'v0' to the uitreenode and uitree commands. Second, pause the execution of the m-file after the uitree command by approx. 0.1 seconds (could depend on your computer). To this, replace the code from line 28 to 31 by