Change build tree code to fit new syntax