+($simples, $smsgs) = $make_objs->(@backwards);
+my $backward = thread_to_s($smsgs);
+SKIP: {
+ skip 'Mail::Thread missing', 1 unless $mt;
+ check_mt($backward, $simples, 'matches Mail::Thread backwards');
+}
+($simples, $smsgs) = $make_objs->(reverse @backwards);
+my $forward = thread_to_s($smsgs);
+unless ('Mail::Thread sorts by Date') {
+ SKIP: {
+ skip 'Mail::Thread missing', 1 unless $mt;
+ check_mt($forward, $simples, 'matches Mail::Thread forwards');
+ }
+}
+if ('sorting by Date') {
+ is("\n".$backward, "\n".$forward, 'forward and backward matches');
+}
+
+SKIP: {
+ require_mods 'Devel::Cycle', 1;
+ Devel::Cycle->import('find_cycle');
+ my @dup = (
+ { mid => 5, references => '<6>' },
+ { mid => 5, references => '<6> <1>' },
+ );
+ open my $fh, '+>', \(my $out = '') or xbail "open: $!";
+ (undef, $smsgs) = $make_objs->(@dup);
+ eval 'package EmptyInbox; sub smsg_by_mid { undef }';
+ my $ctx = { ibx => bless {}, 'EmptyInbox' };
+ my $rootset = PublicInbox::SearchThread::thread($smsgs, sub {
+ @{$_[0]} = sort { $a->{mid} cmp $b->{mid} } @{$_[0]} }, $ctx);
+ my $oldout = select $fh;
+ find_cycle($rootset);
+ select $oldout;
+ is($out, '', 'nothing from find_cycle');
+} # Devel::Cycle check