commit-graph: fix bug around octopus merges