let merge_current ~degenerate =
    Current_table.merge_db_table current_table;
    if not degenerate &&
      ((not (Db.Value.Record_Value_Callbacks.is_empty ())) ||
         (not (Db.Value.Record_Value_Superposition_Callbacks.is_empty ())))
    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 =
          Current_table.superpositions current_table 
        in
        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
        Value_parameters.feedback "now calling Record_Value callbacks";
        let current_states = 
          Current_table.states current_table
        in
        Db.Value.Record_Value_Callbacks.apply
          (stack_for_callbacks, current_states);
      end
    end;
    Current_table.clear current_table