Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 23179)
+++ wp-includes/link-template.php	(working copy)
@@ -1303,10 +1303,6 @@
  * @return object
  */
 function get_boundary_post( $in_same_cat = false, $excluded_categories = '', $start = true ) {
-	$post = get_post();
-	if ( ! $post || ! is_single() || is_attachment() )
-		return null;
-
 	$cat_array = array();
 	if( ! is_array( $excluded_categories ) )
 		$excluded_categories = explode( ',', $excluded_categories );
Index: wp-includes/deprecated.php
===================================================================
--- wp-includes/deprecated.php	(revision 23179)
+++ wp-includes/deprecated.php	(working copy)
@@ -2719,6 +2719,9 @@
  */
 function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
 	_deprecated_function( __FUNCTION__, '3.3' );
+	$post = get_post();
+	if ( ! $post || ! is_single() || is_attachment() )
+		return null;
 
 	$posts = get_boundary_post($in_same_cat, $excluded_categories, $start);
 	// If there is no post stop.
