To remove the notice, try replacing the line 419 by:
wp_redirect(empty($_SERVER['QUERY_STRING']) ? $redirect : $redirect . ($wp_rewrite->using_permalinks() ? '?' : '&') . $_SERVER['QUERY_STRING']);
According to search results, this notice should appear on IIS, not on Apache.