Index: src/wp-includes/post.php
===================================================================
--- src/wp-includes/post.php	(revision 37167)
+++ src/wp-includes/post.php	(working copy)
@@ -5073,9 +5073,16 @@
 	if ( !is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) )
 		return false;
 
+	$thumbfile = false;
 	$file = get_attached_file( $post->ID );
 
-	if ( !empty($imagedata['thumb']) && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file)) && file_exists($thumbfile) ) {
+	if ( isset( $imagedata['sizes']['thumbnail']['file']) ) {
+		$thumbfile = $imagedata['sizes']['thumbnail']['file'];
+	} elseif ( isset( $imagedata['thumb'] ) ) {
+		$thumbfile = $imagedata['thumb'];
+	}
+
+	if ($thumbfile && file_exists(str_replace(basename($file), $thumbfile, $file)) ) {
 		/**
 		 * Filter the attachment thumbnail file path.
 		 *
@@ -5084,9 +5091,10 @@
 		 * @param string $thumbfile File path to the attachment thumbnail.
 		 * @param int    $post_id   Attachment ID.
 		 */
-		return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );
+		$thumbfile = apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );
 	}
-	return false;
+
+	return $thumbfile;
 }
 
 /**
Index: tests/phpunit/tests/post/attachments.php
===================================================================
--- tests/phpunit/tests/post/attachments.php	(revision 37167)
+++ tests/phpunit/tests/post/attachments.php	(working copy)
@@ -520,4 +520,23 @@
 
 		$this->assertContains( 'images/media/video.png', $icon );
 	}
+
+	/**
+	 * @ticket 17262
+	 */
+	public function test_wp_get_attachment_thumb_file() {
+		if ( !function_exists( 'imagejpeg' ) )
+			$this->markTestSkipped( 'jpeg support unavailable' );
+
+		$filename = ( DIR_TESTDATA.'/images/a2-small.jpg' );
+		$contents = file_get_contents($filename);
+
+		$upload = wp_upload_bits(basename($filename), null, $contents);
+		$this->assertTrue( empty($upload['error']) );
+
+		$id = $this->_make_attachment($upload);
+
+		$this->assertFalse(wp_get_attachment_thumb_file());
+		$this->assertEquals('a2-small-150x150.jpg', wp_get_attachment_thumb_file($id));
+	}
 }
