r2310 - forward-port the expand/collapse code to trunk