diff --git bp-core/bp-core-template-loader.php bp-core/bp-core-template-loader.php
index 334a449..7887169 100644
--- bp-core/bp-core-template-loader.php
+++ bp-core/bp-core-template-loader.php
@@ -211,10 +211,7 @@ function bp_buffer_template_part( $slug, $name = null, $echo = true ) {
 	add_filter( 'the_content', 'bp_replace_the_content' );
 
 	// Get the output buffer contents
-	$output = ob_get_contents();
-
-	// Flush the output buffer
-	ob_end_clean();
+	$output = ob_get_clean();
 
 	// Echo or return the output buffer contents
 	if ( true === $echo ) {
@@ -341,20 +338,39 @@ function bp_template_include_theme_supports( $template = '' ) {
 	// Look for root BuddyPress template files in parent/child themes
 	$new_template = apply_filters( 'bp_get_root_template', false, $template );
 
-	// BuddyPress template file exists
+	// A BuddyPress template file was located, so override the WordPress
+	// template and use it to switch off BuddyPress's theme compatibility.
 	if ( !empty( $new_template ) ) {
-
-		// Override the WordPress template with a BuddyPress one
-		$template = $new_template;
-
-		// @see: bp_template_include_theme_compat()
-		buddypress()->theme_compat->found_template = true;
+		$template = bp_set_template_included( $new_template );
 	}
 
 	return apply_filters( 'bp_template_include_theme_supports', $template );
 }
 
 /**
+ * Set the included template
+ *
+ * @since BuddyPress (1.8)
+ * @param mixed $template Default false
+ * @return mixed False if empty. Template name if template included
+ */
+function bp_set_template_included( $template = false ) {
+	buddypress()->theme_compat->found_template = $template;
+
+	return buddypress()->theme_compat->found_template;
+}
+
+/**
+ * Is a BuddyPress template being included?
+ *
+ * @since BuddyPress (1.8)
+ * @return bool True if yes, false if no
+ */
+function bp_is_template_included() {
+	return ! empty( buddypress()->theme_compat->found_template );
+}
+
+/**
  * Attempt to load a custom BuddyPress functions file, similar to each themes
  * functions.php file.
  *
diff --git bp-core/bp-core-theme-compatibility.php bp-core/bp-core-theme-compatibility.php
index 3594b49..44db36c 100644
--- bp-core/bp-core-theme-compatibility.php
+++ bp-core/bp-core-theme-compatibility.php
@@ -348,43 +348,9 @@ function bp_register_theme_package( $theme = array(), $override = true ) {
 function bp_theme_compat_reset_post( $args = array() ) {
 	global $wp_query, $post;
 
-	// Default arguments
-	$defaults = array(
-		'ID'                    => -9999,
-		'post_status'           => 'publish',
-		'post_author'           => 0,
-		'post_parent'           => 0,
-		'post_type'             => 'page',
-		'post_date'             => 0,
-		'post_date_gmt'         => 0,
-		'post_modified'         => 0,
-		'post_modified_gmt'     => 0,
-		'post_content'          => '',
-		'post_title'            => '',
-		'post_category'         => 0,
-		'post_excerpt'          => '',
-		'post_content_filtered' => '',
-		'post_mime_type'        => '',
-		'post_password'         => '',
-		'post_name'             => '',
-		'guid'                  => '',
-		'menu_order'            => 0,
-		'pinged'                => '',
-		'to_ping'               => '',
-		'ping_status'           => '',
-		'comment_status'        => 'closed',
-		'comment_count'         => 0,
-
-		'is_404'          => false,
-		'is_page'         => false,
-		'is_single'       => false,
-		'is_archive'      => false,
-		'is_tax'          => false,
-	);
-
 	// Switch defaults if post is set
 	if ( isset( $wp_query->post ) ) {
-		$defaults = array(
+		$dummy = wp_parse_args( $args, array(
 			'ID'                    => $wp_query->post->ID,
 			'post_status'           => $wp_query->post->post_status,
 			'post_author'           => $wp_query->post->post_author,
@@ -408,52 +374,60 @@ function bp_theme_compat_reset_post( $args = array() ) {
 			'ping_status'           => $wp_query->post->ping_status,
 			'comment_status'        => $wp_query->post->comment_status,
 			'comment_count'         => $wp_query->post->comment_count,
+			'filter'                => $wp_query->post->filter,
+
+			'is_404'                => false,
+			'is_page'               => false,
+			'is_single'             => false,
+			'is_archive'            => false,
+			'is_tax'                => false,
+		) );
+	} else {
+		$dummy = wp_parse_args( $args, array(
+			'ID'                    => -9999,
+			'post_status'           => 'publish',
+			'post_author'           => 0,
+			'post_parent'           => 0,
+			'post_type'             => 'page',
+			'post_date'             => 0,
+			'post_date_gmt'         => 0,
+			'post_modified'         => 0,
+			'post_modified_gmt'     => 0,
+			'post_content'          => '',
+			'post_title'            => '',
+			'post_excerpt'          => '',
+			'post_content_filtered' => '',
+			'post_mime_type'        => '',
+			'post_password'         => '',
+			'post_name'             => '',
+			'guid'                  => '',
+			'menu_order'            => 0,
+			'pinged'                => '',
+			'to_ping'               => '',
+			'ping_status'           => '',
+			'comment_status'        => 'closed',
+			'comment_count'         => 0,
+			'filter'                => 'raw',
+
+			'is_404'                => false,
+			'is_page'               => false,
+			'is_single'             => false,
+			'is_archive'            => false,
+			'is_tax'                => false,
+		) );
+	}
 
-			'is_404'          => false,
-			'is_page'         => false,
-			'is_single'       => false,
-			'is_archive'      => false,
-			'is_tax'          => false,
-		);
+	// Bail if dummy post is empty
+	if ( empty( $dummy ) ) {
+		return;
 	}
-	$dummy = wp_parse_args( $args, $defaults ); //, 'theme_compat_reset_post' );
-
-	// Clear out the post related globals
-	unset( $wp_query->posts );
-	unset( $wp_query->post  );
-	unset( $post            );
-
-	// Setup the dummy post object
-	$wp_query->post                        = new stdClass;
-	$wp_query->post->ID                    = $dummy['ID'];
-	$wp_query->post->post_status           = $dummy['post_status'];
-	$wp_query->post->post_author           = $dummy['post_author'];
-	$wp_query->post->post_parent           = $dummy['post_parent'];
-	$wp_query->post->post_type             = $dummy['post_type'];
-	$wp_query->post->post_date             = $dummy['post_date'];
-	$wp_query->post->post_date_gmt         = $dummy['post_date_gmt'];
-	$wp_query->post->post_modified         = $dummy['post_modified'];
-	$wp_query->post->post_modified_gmt     = $dummy['post_modified_gmt'];
-	$wp_query->post->post_content          = $dummy['post_content'];
-	$wp_query->post->post_title            = $dummy['post_title'];
-	$wp_query->post->post_excerpt          = $dummy['post_excerpt'];
-	$wp_query->post->post_content_filtered = $dummy['post_content_filtered'];
-	$wp_query->post->post_mime_type        = $dummy['post_mime_type'];
-	$wp_query->post->post_password         = $dummy['post_password'];
-	$wp_query->post->post_name             = $dummy['post_name'];
-	$wp_query->post->guid                  = $dummy['guid'];
-	$wp_query->post->menu_order            = $dummy['menu_order'];
-	$wp_query->post->pinged                = $dummy['pinged'];
-	$wp_query->post->to_ping               = $dummy['to_ping'];
-	$wp_query->post->ping_status           = $dummy['ping_status'];
-	$wp_query->post->comment_status        = $dummy['comment_status'];
-	$wp_query->post->comment_count         = $dummy['comment_count'];
 
 	// Set the $post global
-	$post = $wp_query->post;
+	$post = new WP_Post( (object) $dummy );
 
-	// Setup the dummy post loop
-	$wp_query->posts[0] = $wp_query->post;
+	// Copy the new post global into the main $wp_query
+	$wp_query->post       = $post;
+	$wp_query->posts      = array( $post );
 
 	// Prevent comments form from appearing
 	$wp_query->post_count = 1;
@@ -463,8 +437,20 @@ function bp_theme_compat_reset_post( $args = array() ) {
 	$wp_query->is_archive = $dummy['is_archive'];
 	$wp_query->is_tax     = $dummy['is_tax'];
 
+	// Clean up the dummy post
+	unset( $dummy );
+
+	/**
+	 * Force the header back to 200 status if not a deliberate 404
+	 *
+	 * @see http://bbpress.trac.wordpress.org/ticket/1973
+	 */
+	if ( ! $wp_query->is_404() ) {
+		status_header( 200 );
+	}
+
 	// If we are resetting a post, we are in theme compat
-	bp_set_theme_compat_active();
+	bp_set_theme_compat_active( true );
 }
 
 /**
@@ -523,22 +509,14 @@ function bp_template_include_theme_compat( $template = '' ) {
 	 * possible templates, or 'bp_buddypress_template' to override the result.
 	 */
 	if ( bp_is_theme_compat_active() ) {
+		$template = bp_get_theme_compat_templates();
 
-		// Hook to the beginning of the main post loop to remove all filters
-		// from the_content as late as possible.
-		add_action( 'loop_start', 'bp_theme_compat_main_loop_start',  9999 );
-
-		// Hook to the end of the main post loop to restore all filters to
-		// the_content as early as possible.
-		add_action( 'loop_end',   'bp_theme_compat_main_loop_end',   -9999 );
+		add_filter( 'the_content', 'bp_replace_the_content' );
 
 		// Add BuddyPress's head action to wp_head
 		if ( ! has_action( 'wp_head', 'bp_head' ) ) {
 			add_action( 'wp_head', 'bp_head' );
 		}
-
-		// Find the appropriate template file
-		$template = bp_get_theme_compat_templates();
 	}
 
 	return apply_filters( 'bp_template_include_theme_compat', $template );
@@ -555,13 +533,19 @@ function bp_template_include_theme_compat( $template = '' ) {
  */
 function bp_replace_the_content( $content = '' ) {
 
-	if ( ! in_the_loop() )
+	// Bail if not the main loop where theme compat is happening
+	if ( ! bp_do_theme_compat() )
 		return $content;
 
+	// Set theme compat to false early, to avoid recursion from nested calls to
+	// the_content() that execute before theme compat has unhooked itself.
+	bp_set_theme_compat_active( false );
+
+	// Do we have new content to replace the old content?
 	$new_content = apply_filters( 'bp_replace_the_content', $content );
 
 	// Juggle the content around and try to prevent unsightly comments
-	if ( !empty( $new_content ) && ( $new_content != $content ) ) {
+	if ( !empty( $new_content ) && ( $new_content !== $content ) ) {
 
 		// Set the content to be the new content
 		$content = $new_content;
@@ -578,44 +562,13 @@ function bp_replace_the_content( $content = '' ) {
 }
 
 /**
- * Helper function to conditionally toggle the_content filters in the main
- * query loop. Aids with theme compatibility.
+ * Are we replacing the_content
  *
  * @since BuddyPress (1.8)
- * @internal Used only by theme compatibilty
- * @see bp_template_include_theme_compat()
- * @see bp_theme_compat_main_loop_end()
- */
-function bp_theme_compat_main_loop_start() {
-
-	// Bail if not the main query
-	if ( ! in_the_loop() )
-		return;
-
-	// Remove all of the filters from the_content
-	bp_remove_all_filters( 'the_content' );
-
-	// Make sure we replace the content
-	add_filter( 'the_content', 'bp_replace_the_content' );
-}
-
-/**
- * Helper function to conditionally toggle the_content filters in the main
- * query loop. Aids with theme compatibility.
- *
- * @since BuddyPress (1.8)
- * @internal Used only by theme compatibilty
- * @see bp_template_include_theme_compat()
- * @see bp_theme_compat_main_loop_start()
+ * @return bool
  */
-function bp_theme_compat_main_loop_end() {
-
-	// Bail if not the main query
-	if ( ! in_the_loop() )
-		return;
-
-	// Put all the filters back
-	bp_restore_all_filters( 'the_content' );
+function bp_do_theme_compat() {
+	return (bool) ( ! bp_is_template_included() && in_the_loop() && bp_is_theme_compat_active() );
 }
 
 /** Filters *******************************************************************/
