I think I have this tracked down, possibly to some code that wasn't meant to be left in.
Line 1317 of scripts/showflat.inc.php has a block of code that looks like this:
// If mode is showthreaded, then we need to show the tree
$topic_tree = array();
if ($mode == "showthreaded") {
$topic_id = $topic_info['TOPIC_ID'];
$unread = 0;
if (isset($_SESSION['topicread'][$topic_id])) {
$unread = $_SESSION['topicread'][$topic_id];
}
include("libs/topic_tree.inc.php");
} // end if
Changing that, to this, seems to have cleared it up on my test forum:
// If mode is showthreaded, then we need to show the tree
$topic_tree = array();
if ($mode == "showthreaded") {
$topic_id = $topic_info['TOPIC_ID'];
// $unread = 0;
// if (isset($_SESSION['topicread'][$topic_id])) {
// $unread = $_SESSION['topicread'][$topic_id];
// }
include("libs/topic_tree.inc.php");
} // end if