diff --git a/src/wp-includes/class-wp-theme.php b/src/wp-includes/class-wp-theme.php
index 9fa101906a..fd52275dc8 100644
--- a/src/wp-includes/class-wp-theme.php
+++ b/src/wp-includes/class-wp-theme.php
@@ -1476,6 +1476,12 @@ final class WP_Theme implements ArrayAccess {
 	 * @return bool
 	 */
 	public function is_block_theme() {
+		$is_block_theme = wp_cache_get( 'is_block_theme' );
+
+		if ( false !== $is_block_theme ) {
+			return (bool) $is_block_theme;
+		}
+
 		$paths_to_index_block_template = array(
 			$this->get_file_path( '/block-templates/index.html' ),
 			$this->get_file_path( '/templates/index.html' ),
@@ -1483,10 +1489,18 @@ final class WP_Theme implements ArrayAccess {
 
 		foreach ( $paths_to_index_block_template as $path_to_index_block_template ) {
 			if ( is_file( $path_to_index_block_template ) && is_readable( $path_to_index_block_template ) ) {
-				return true;
+				$content = file_get_contents( $path_to_index_block_template );
+				$blocks  = parse_blocks( $content );
+
+				if ( $blocks && array_filter( wp_list_pluck( $blocks, 'blockName' ) ) ) {
+					wp_cache_set( 'is_block_theme', 1 );
+					return true;
+				}
 			}
 		}
 
+		wp_cache_set( 'is_block_theme', 0 );
+
 		return false;
 	}
 
diff --git a/src/wp-includes/template.php b/src/wp-includes/template.php
index 891e77748d..4d43d69237 100644
--- a/src/wp-includes/template.php
+++ b/src/wp-includes/template.php
@@ -63,7 +63,9 @@ function get_query_template( $type, $templates = array() ) {
 
 	$template = locate_template( $templates );
 
-	$template = locate_block_template( $template, $type, $templates );
+	if ( wp_is_block_theme() ) {
+		$template = locate_block_template( $template, $type, $templates );
+	}
 
 	/**
 	 * Filters the path of the queried template by type.
