Index: src/wp-admin/includes/plugin.php
===================================================================
--- src/wp-admin/includes/plugin.php	(revision 31802)
+++ src/wp-admin/includes/plugin.php	(working copy)
@@ -538,9 +538,7 @@
 			wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); // we'll override this later if the plugin can be included without fatal error
 		ob_start();
 		wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
-		$_wp_plugin_file = $plugin;
-		include_once( WP_PLUGIN_DIR . '/' . $plugin );
-		$plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin.
+		_include_plugin_file( $plugin );
 
 		if ( ! $silent ) {
 			/**
@@ -611,6 +609,16 @@
 }
 
 /**
+ * Includes a plugin file
+ *
+ * @param string $plugin Plugin path to main plugin file with plugin data.
+ * @access private
+ */
+function _include_plugin_file( $plugin ) {
+    include_once( WP_PLUGIN_DIR . '/' . $plugin );
+}
+
+/**
  * Deactivate a single plugin or multiple plugins.
  *
  * The deactivation hook is disabled by the plugin upgrader by using the $silent
