fix delete order to avoid foreign key trouble, #13971
avoid foreign key errors when reconciling NENA2 batches, #14049