Index: src/wp-includes/query.php
===================================================================
--- src/wp-includes/query.php	(revision 28524)
+++ src/wp-includes/query.php	(working copy)
@@ -1666,14 +1666,10 @@
 			}
 		}
 
-		if ( '' != $qv['pagename'] ) {
-			$this->queried_object = get_page_by_path($qv['pagename']);
-			if ( !empty($this->queried_object) )
-				$this->queried_object_id = (int) $this->queried_object->ID;
-			else
-				unset($this->queried_object);
-
-			if  ( 'page' == get_option('show_on_front') && isset($this->queried_object_id) && $this->queried_object_id == get_option('page_for_posts') ) {
+		// we have a slug and need to retrieve the id
+		if  ( '' != $qv['pagename'] ) {
+			$this->get_queried_object();
+			if ( 'page' == get_option( 'show_on_front' ) && isset( $this->queried_object_id ) && $this->queried_object_id == get_option( 'page_for_posts' ) ) {
 				$this->is_page = false;
 				$this->is_home = true;
 				$this->is_posts_page = true;
@@ -3694,12 +3690,33 @@
 			$page_for_posts = get_option('page_for_posts');
 			$this->queried_object = get_post( $page_for_posts );
 			$this->queried_object_id = (int) $this->queried_object->ID;
-		} elseif ( $this->is_singular && !is_null($this->post) ) {
-			$this->queried_object = $this->post;
-			$this->queried_object_id = (int) $this->post->ID;
+		} elseif ( $this->is_singular ) {
+			if ( isset( $this->post ) ) {
+				$this->queried_object = $this->post;
+				$this->queried_object_id = (int) $this->post->ID;
+			} elseif ( $this->get( 'p' ) ) {
+				$this->queried_object = get_post( $this->get( 'p' ) );
+				$this->queried_object_id = (int) $this->get( 'p' );
+			} elseif ( $this->get( 'page_id' ) ) {
+				$this->queried_object = get_post( $this->get( 'page_id' ) );
+				$this->queried_object_id = (int) $this->get( 'page_id' );
+			} elseif ( $this->get( 'pagename' ) || $this->get( 'name' ) ) {
+				$name = $this->get( 'pagename', false ) ? $this->get( 'pagename' ) : $this->get( 'name' );
+				$this->queried_object = $this->post = get_page_by_path( 
+					$name, 
+					OBJECT, 
+					$this->get( 'post_type' ) ? $this->get( 'post_type' ) : ( !empty( $this->is_single ) ? 'post' : 'page' )
+				);
+				$this->queried_object_id = (int) $this->post->ID;
+			}
 		} elseif ( $this->is_author ) {
-			$this->queried_object_id = (int) $this->get('author');
-			$this->queried_object = get_userdata( $this->queried_object_id );
+			if ( $this->get( 'author' ) ) {
+				$this->queried_object_id = (int) $this->get( 'author' );
+				$this->queried_object = get_userdata( $this->queried_object_id );
+			} elseif ( $this->get( 'author_name' ) ) {
+				$this->queried_object = get_user_by( 'login', $this->get( 'author_name' ) );
+				$this->queried_object_id = (int) $this->queried_object->ID;		
+			}
 		}
 
 		return $this->queried_object;
