commit-tree: do not overflow MAXPARENT