Index: wp-includes/classes.php
===================================================================
--- wp-includes/classes.php	(revision 13536)
+++ wp-includes/classes.php	(working copy)
@@ -474,7 +474,7 @@
 	function handle_404() {
 		global $wp_query;
 
-		if ( ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() ) {
+		if ( ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() && apply_filters('handle_404', true, $wp_query) ) {
 			// Don't 404 for these queries if they matched an object.
 			if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() ) {
 				if ( !is_404() )
