Index: src/includes/topics/template.php
===================================================================
--- src/includes/topics/template.php	(revision 5773)
+++ src/includes/topics/template.php	(working copy)
@@ -1999,7 +1999,7 @@
 	echo bbp_get_topic_last_reply_id( $topic_id );
 }
 	/**
-	 * Return the topics last update date/time (aka freshness)
+	 * Return the topics last reply id
 	 *
 	 * @since bbPress (r2625)
 	 *
@@ -2014,10 +2014,6 @@
 		$topic_id = bbp_get_topic_id( $topic_id );
 		$reply_id = get_post_meta( $topic_id, '_bbp_last_reply_id', true );
 
-		if ( empty( $reply_id ) ) {
-			$reply_id = $topic_id;
-		}
-
 		return (int) apply_filters( 'bbp_get_topic_last_reply_id', (int) $reply_id, $topic_id );
 	}
 
Index: tests/phpunit/testcases/2806.php
===================================================================
--- tests/phpunit/testcases/2806.php	(revision 0)
+++ tests/phpunit/testcases/2806.php	(working copy)
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * Tests for the topic component functions.
+ *
+ * @group get_last_thing
+ */
+class BBP_Tests_2806 extends BBP_UnitTestCase {
+
+	/**
+	 * @ticket 2806
+	 */
+	public function test_bbp_get_forum_and_topic_last_topic_and_last_reply_id() {
+
+		$f = $this->factory->forum->create();
+
+		// Get the forums last topic id _bbp_last_topic_id
+		$this->assertSame( 0, bbp_get_forum_last_topic_id( $f ) );
+
+		$t = $this->factory->topic->create( array(
+			'post_parent' => $f,
+			'topic_meta' => array(
+				'forum_id' => $f,
+			)
+		) );
+
+		// Get the forums last topic id _bbp_last_topic_id
+		$this->assertSame( $t, bbp_get_forum_last_topic_id( $f ) );
+
+		// Get the topics last reply id _bbp_last_reply_id
+		$this->assertSame( 0, bbp_get_topic_last_reply_id( $t ) );
+
+		// Create another reply
+		$r = $this->factory->reply->create( array(
+			'post_parent' => $t,
+			'reply_meta' => array(
+				'forum_id' => $f,
+				'topic_id' => $t,
+			)
+		) );
+		// Get the topics last reply id _bbp_last_reply_id
+		$this->assertSame( $r, bbp_get_topic_last_reply_id( $t ) );
+	}
+}
