Following up on my previous email, it appears to me that the following line in mergelines_node is weird:
node->dest -= lo_orig - node->lo + hi_orig - node->hi; Surely there should be a "*" in front of that line? (This does not fix the bug; perhaps it is a different bug?)