Fix up some problems from the commit->tree helper patch