Index: Gruntfile.js
===================================================================
--- Gruntfile.js	(revision 25144)
+++ Gruntfile.js	(working copy)
@@ -17,6 +17,22 @@
 		},
 		copy: {
 			all: {
+				options: {
+					processContent: function( src, filepath ) {
+						if ( filepath.indexOf( 'wp-settings.php' ) > -1 ) {
+							src = src.replace( /\/\/ Removed when building the release\s+/, '' )
+								.replace( /if \( ! defined\( 'SCRIPT_DEBUG' \) \)\s+/, '' )
+								.replace( /define\( 'SCRIPT_DEBUG', true \);\s+/, '' );
+							
+							if ( src.indexOf( 'SCRIPT_DEBUG' ) > -1 ) {
+								grunt.fail.fatal('Failed to remove SCRIPT_DEBUG from wp-settings.php');;
+							}
+						}
+
+						return src;
+					},
+					processContentExclude: SOURCE_DIR + '*/**' // Don't process files in sub-directories
+				},
 				dot: true,
 				expand: true,
 				cwd: SOURCE_DIR,
Index: src/wp-includes/script-loader.php
===================================================================
--- src/wp-includes/script-loader.php	(revision 25144)
+++ src/wp-includes/script-loader.php	(working copy)
@@ -57,11 +57,8 @@
 	$scripts->default_version = get_bloginfo( 'version' );
 	$scripts->default_dirs = array('/wp-admin/js/', '/wp-includes/js/');
 
-	if ( ! defined( 'SCRIPT_DEBUG' ) )
-		define( 'SCRIPT_DEBUG', ! file_exists( ABSPATH . WPINC . '/js/wp-util.min.js' ) );
+	$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
 
-	$suffix = SCRIPT_DEBUG ? '' : '.min';
-
 	$scripts->add( 'utils', "/wp-includes/js/utils$suffix.js" );
 	did_action( 'init' ) && $scripts->localize( 'utils', 'userSettings', array(
 		'url' => (string) SITECOOKIEPATH,
Index: src/wp-settings.php
===================================================================
--- src/wp-settings.php	(revision 25144)
+++ src/wp-settings.php	(working copy)
@@ -15,6 +15,11 @@
  *
  * @since 1.0.0
  */
+
+// Removed when building the release
+if ( ! defined( 'SCRIPT_DEBUG' ) )
+	define( 'SCRIPT_DEBUG', true );
+
 define( 'WPINC', 'wp-includes' );
 
 // Include files required for initialization.
