Index: src/wp-includes/class-wp-customize-nav-menus.php
===================================================================
--- src/wp-includes/class-wp-customize-nav-menus.php	(revision 41778)
+++ src/wp-includes/class-wp-customize-nav-menus.php	(working copy)
@@ -597,7 +597,10 @@
 		// Attempt to re-map the nav menu location assignments when previewing a theme switch.
 		$mapped_nav_menu_locations = array();
 		if ( ! $this->manager->is_theme_active() ) {
-			$mapped_nav_menu_locations = wp_map_nav_menu_locations( get_nav_menu_locations(), $this->original_nav_menu_locations );
+			$theme_mods = get_option( 'theme_mods_' . $this->manager->get_stylesheet(), array() );
+			if ( ! empty( $theme_mods['nav_menu_locations'] ) ) {
+				$mapped_nav_menu_locations = wp_map_nav_menu_locations( $theme_mods['nav_menu_locations'], $this->original_nav_menu_locations );
+			}
 		}
 
 		foreach ( $locations as $location => $description ) {
Index: src/wp-includes/nav-menu.php
===================================================================
--- src/wp-includes/nav-menu.php	(revision 41778)
+++ src/wp-includes/nav-menu.php	(working copy)
@@ -1084,7 +1084,8 @@
  * @return array Nav menus mapped to new nav menu locations.
  */
 function wp_map_nav_menu_locations( $new_nav_menu_locations, $old_nav_menu_locations ) {
-	$registered_nav_menus = get_registered_nav_menus();
+	$registered_nav_menus   = get_registered_nav_menus();
+	$new_nav_menu_locations = array_intersect_key( $new_nav_menu_locations, $registered_nav_menus );
 
 	// Short-circuit if there are no old nav menu location assignments to map.
 	if ( empty( $old_nav_menu_locations ) ) {
Index: tests/phpunit/tests/menu/nav-menu.php
===================================================================
--- tests/phpunit/tests/menu/nav-menu.php	(revision 41778)
+++ tests/phpunit/tests/menu/nav-menu.php	(working copy)
@@ -47,6 +47,23 @@
 		$this->assertEquals( $expected_nav_menu_locations, $new_next_theme_nav_menu_locations );
 	}
 
+
+	function test_filter_registered_locations() {
+		$this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
+		$old_next_theme_nav_menu_locations = $prev_theme_nav_menu_locations = array(
+			'primary' => 1,
+			'secondary' => 2,
+			'social' => 3,
+		);
+		$new_next_theme_nav_menu_locations = wp_map_nav_menu_locations( $old_next_theme_nav_menu_locations, $prev_theme_nav_menu_locations );
+
+		$expected_nav_menu_locations = array(
+			'primary' => 1,
+			'secondary' => 2,
+		);
+		$this->assertEquals( $expected_nav_menu_locations, $new_next_theme_nav_menu_locations );
+	}
+
 	/**
 	 * Locations with the same name should map, switching to a theme not previously-active.
 	 *
