let merge_current ~degenerate =
    let superposed = lazy (Current_table.states current_table) in
    let after_full = local_after_states superposed in
    Current_table.merge_db_table superposed;
    Db.Value.merge_conditions conditions_table;
    if Value_parameters.ResultsAfter.get () then merge_after after_full;
    if not degenerate then begin
      let stack_for_callbacks = for_callbacks_stack () in

      if not (Db.Value.Record_Value_Superposition_Callbacks.is_empty ())
      then begin
        let current_superpositions =
          lazy (Current_table.superpositions current_table)
        in
        if Value_parameters.ValShowProgress.get() then
          Value_parameters.feedback
            "now calling Record_Value_Superposition callbacks";
        Db.Value.Record_Value_Superposition_Callbacks.apply
          (stack_for_callbacks, current_superpositions);
      end ;

      if not (Db.Value.Record_Value_Callbacks.is_empty ())
      then begin
        if Value_parameters.ValShowProgress.get() then
          Value_parameters.feedback "now calling Record_Value callbacks";
        Db.Value.Record_Value_Callbacks.apply
          (stack_for_callbacks, superposed)
      end;

      if not (Db.Value.Record_Value_After_Callbacks.is_empty ())
      then begin
        if Value_parameters.ValShowProgress.get() then
          Value_parameters.feedback "now calling Record_After_Value callbacks";
        Db.Value.Record_Value_After_Callbacks.apply
          (stack_for_callbacks, after_full);
      end;

    end;
    Current_table.clear current_table