let test_and_merge ~old new_ =
    let result = merge new_ old in
    if equal result old then None else Some result