As is_bbpress() doesn’t work within the bbp_theme_compat_actions hook, the solution would be to conditionnaly remove bbp_head and bbp_enqueue_scripts. It’s a bit more extreme but it works:
`add_action( ‘wp_head’, ‘conditional_bbpress_head’, 9 );
function conditional_bbpress_head(){
if( !is_bbpress() )
remove_action( ‘wp_head’, ‘bbp_head’ );
}
add_action( ‘wp_enqueue_scripts’, ‘conditional_bbpress_scripts’, 9 );
function conditional_bbpress_scripts(){
if( !is_bbpress() )
remove_action( ‘wp_enqueue_scripts’, ‘bbp_enqueue_scripts’ );
}`