Index: wp-includes/class-wp-theme.php
===================================================================
--- wp-includes/class-wp-theme.php	(revision 40650)
+++ wp-includes/class-wp-theme.php	(working copy)
@@ -267,6 +267,12 @@
 			}
 		}
 
+		if ( ! $this->template && $this->stylesheet === $this->headers['Template']) {
+			$this->errors = new WP_Error( 'child_theme_invalid', __( 'The theme defines itself as its parent theme. Please fix the "Template" header.' ) );
+			$this->cache_add( 'theme', array( 'headers' => $this->headers, 'errors' => $this->errors, 'stylesheet' => $this->stylesheet ) );
+			return;
+		}//end if
+
 		// (If template is set from cache [and there are no errors], we know it's good.)
 		if ( ! $this->template && ! ( $this->template = $this->headers['Template'] ) ) {
 			$this->template = $this->stylesheet;
