Index: bp-core/bp-core-template-loader.php
===================================================================
--- bp-core/bp-core-template-loader.php
+++ bp-core/bp-core-template-loader.php
@@ -202,20 +202,18 @@ function bp_get_template_stack() {
 function bp_buffer_template_part( $slug, $name = null, $echo = true ) {
 	ob_start();
 
-	// Remove 'bp_replace_the_content' filter to prevent infinite loops
-	remove_filter( 'the_content', 'bp_replace_the_content' );
-
 	bp_get_template_part( $slug, $name );
 
-	// Remove 'bp_replace_the_content' filter to prevent infinite loops
-	add_filter( 'the_content', 'bp_replace_the_content' );
-
 	// Get the output buffer contents
 	$output = ob_get_contents();
 
 	// Flush the output buffer
 	ob_end_clean();
 
+	// Remove our filter just in case there are other post loops
+	// after this one is rendered
+	remove_filter( 'the_content', 'bp_replace_the_content' );
+
 	// Echo or return the output buffer contents
 	if ( true === $echo ) {
 		echo $output;
Index: bp-core/bp-core-theme-compatibility.php
===================================================================
--- bp-core/bp-core-theme-compatibility.php
+++ bp-core/bp-core-theme-compatibility.php
@@ -521,13 +521,18 @@ function bp_template_include_theme_compat( $template = '' ) {
 	 */
 	if ( bp_is_theme_compat_active() ) {
 
-		// Remove all filters from the_content
-		bp_remove_all_filters( 'the_content' );
-
-		// Add a filter on the_content late, which we will later remove
-		if ( ! has_filter( 'the_content', 'bp_replace_the_content' ) ) {
+		// After the_post() is called, remove all filters from 'the_content'.
+		// Next, add our filter to 'the_content' so BP can inject its contents.
+		// This is the latest we can run this before we do our object buffering
+		add_action( 'loop_start', create_function( '', "
+			bp_remove_all_filters( 'the_content' );
 			add_filter( 'the_content', 'bp_replace_the_content' );
-		}
+		" ), 9999 );
+
+		// Restore the filters after the post loop is finished
+		add_action( 'loop_end', create_function( '', "
+			bp_restore_all_filters( 'the_content' );
+		" ), 0 );
 
 		// Add BuddyPress's head action to wp_head
 		if ( ! has_action( 'wp_head', 'bp_head' ) ) {
