Index: Gruntfile.js
===================================================================
--- Gruntfile.js	(revision 26164)
+++ Gruntfile.js	(working copy)
@@ -4,7 +4,7 @@
 		SOURCE_DIR = 'src/',
 		BUILD_DIR = 'build/';
 
-	// Load tasks. 
+	// Load tasks.
 	require('matchdep').filterDev('grunt-*').forEach( grunt.loadNpmTasks );
 
 	// Project configuration.
@@ -215,7 +215,7 @@
 					filepath = filepath.replace( /\\/g, '/' );
 
 					// Match only the filename passed from cli
-					if ( filepath.lastIndexOf( '/' + file ) === filepath.length - ( file.length + 1 ) ) {
+					if ( -1 !== filepath.indexOf( '/' + file ) && filepath.lastIndexOf( '/' + file ) === filepath.length - ( file.length + 1 ) ) {
 						return true;
 					}
 
