Fixing a CrossSite RunAsync bug where it tries to remove the script tag from the head element twice, causing an error in IE.
http://gwt-code-reviews.appspot.com/293802/show

Review by: spoon@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7843 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/core/client/impl/CrossSiteLoadingStrategy.java b/user/src/com/google/gwt/core/client/impl/CrossSiteLoadingStrategy.java
index 4c4a8a5..fb158fb 100644
--- a/user/src/com/google/gwt/core/client/impl/CrossSiteLoadingStrategy.java
+++ b/user/src/com/google/gwt/core/client/impl/CrossSiteLoadingStrategy.java
@@ -83,6 +83,10 @@
       int fragment, JavaScriptObject tag,
       LoadTerminatedHandler loadFinishedHandler) /*-{
      return function(exception) {
+       if (tag.parentNode == null) {
+         // onSuccess or onFailure must have already been called.
+         return;
+       }
        var head = document.getElementsByTagName('head').item(0);
        head.removeChild(tag);
        @com.google.gwt.core.client.impl.CrossSiteLoadingStrategy::clearOnSuccess(*)(fragment);