Index: src/wp-includes/rest-api/class-wp-rest-response.php
===================================================================
--- src/wp-includes/rest-api/class-wp-rest-response.php	(revision 36987)
+++ src/wp-includes/rest-api/class-wp-rest-response.php	(working copy)
@@ -136,7 +136,45 @@
 	 * @return array List of links.
 	 */
 	public function get_links() {
-		return $this->links;
+
+		$curies = $this->get_curies();
+		$used_curies = array();
+		$links = array();
+
+		foreach ( $this->links as $rel => $items ) {
+
+			// Convert $rel URIs to their compact versions if they exist.
+			foreach ( $curies as $curie ) {
+				$href_prefix = substr( $curie['href'], 0, strpos( $curie['href'], '{rel}' ) );
+				if ( strpos( $rel, $href_prefix ) !== 0 ) {
+					continue;
+				}
+				$used_curies[ $curie['name'] ] = $curie;
+
+				// Relation now changes from '$uri' to '$curie:$relation'
+				$rel_regex = str_replace( '\{rel\}', '([\w]+)', preg_quote( $curie['href'], '!' ) );
+				preg_match( '!' . $rel_regex . '!', $rel, $matches );
+				if ( $matches ) {
+					$rel = $curie['name'] . ':' . $matches[1];
+				}
+				break;
+			}
+
+			$links[ $rel ] = array();
+
+			foreach ( $items as $item ) {
+				$attributes = $item['attributes'];
+				$attributes['href'] = $item['href'];
+				$links[ $rel ][] = $attributes;
+			}
+		}
+
+		// Push the curies onto the start of the links array.
+		if ( $used_curies ) {
+			$links = array_merge( array( 'curies' => array_values( $used_curies ) ), $links );
+		}
+
+		return $links;
 	}
 
 	/**
Index: src/wp-includes/rest-api/class-wp-rest-server.php
===================================================================
--- src/wp-includes/rest-api/class-wp-rest-server.php	(revision 36987)
+++ src/wp-includes/rest-api/class-wp-rest-server.php	(working copy)
@@ -453,51 +453,7 @@
 	 * @return array Map of link relation to list of link hashes.
 	 */
 	public static function get_response_links( $response ) {
-		$links = $response->get_links();
-
-		if ( empty( $links ) ) {
-			return array();
-		}
-
-		// Convert links to part of the data.
-		$data = array();
-		$curies = $response->get_curies();
-		$used_curies = array();
-
-		foreach ( $links as $rel => $items ) {
-
-			// Convert $rel URIs to their compact versions if they exist.
-			foreach ( $curies as $curie ) {
-				$href_prefix = substr( $curie['href'], 0, strpos( $curie['href'], '{rel}' ) );
-				if ( strpos( $rel, $href_prefix ) !== 0 ) {
-					continue;
-				}
-				$used_curies[ $curie['name'] ] = $curie;
-
-				// Relation now changes from '$uri' to '$curie:$relation'
-				$rel_regex = str_replace( '\{rel\}', '([\w]+)', preg_quote( $curie['href'], '!' ) );
-				preg_match( '!' . $rel_regex . '!', $rel, $matches );
-				if ( $matches ) {
-					$rel = $curie['name'] . ':' . $matches[1];
-				}
-				break;
-			}
-
-			$data[ $rel ] = array();
-
-			foreach ( $items as $item ) {
-				$attributes = $item['attributes'];
-				$attributes['href'] = $item['href'];
-				$data[ $rel ][] = $attributes;
-			}
-		}
-
-		// Push the curies onto the start of the links array.
-		if ( $used_curies ) {
-			$data = array_merge( array( 'curies' => array_values( $used_curies ) ), $data );
-		}
-
-		return $data;
+		return $response->get_links();
 	}
 
 	/**
