title: Orbeon 4.9 strange client-side javascript error
body: <p>Another migration issue. I have changed orbeon forms version from 3.8 to 4.9.</p>
  
  <p>One of my xforms isn't working after migration, this button freezes form with "xforms-loading-loading" span visible. There are no errors on the server side. Both submissions from this action are getting WSDL/SCHEMA from exist and replaces two xform instances. It is working correctly as I can see with inspector. The only error i can see is Javascript Error "TypeError: "spanContainer is undefined" from line 120 orbeon...*js. spanContainer.appendChild(templateClone) this is the part of code that crashes my application.</p>
  
  <p><code>&lt;xf:trigger ref="instance('page')/edition-valid"&gt;
                          &lt;xf:label&gt;EDIT&lt;/xf:label&gt;
                          &lt;xf:action ev:event="DOMActivate"&gt;
                              &lt;xf:send submission="get-wsdl" /&gt;
                              &lt;xf:send submission="get-schema" /&gt;
                              &lt;xf:action if="not(instance('schema')//xsd:appinfo[text()='imported'])"&gt;
                                  &lt;xf:setvalue ref="instance('page')/edition/operation"
                                      value="instance('wsdl')//wsdl:portType[1]/wsdl:operation[1]/@name" /&gt;
                                  &lt;xf:setvalue ref="instance('page')/edition/cdm"
                                      value="if (instance('page')/edition/adapter='') then 'true' else ()" /&gt;
                                  &lt;xf:toggle case="edition" /&gt;
                              &lt;/xf:action&gt;
                          &lt;/xf:action&gt;
                      &lt;/xf:trigger&gt;</code></p>
  
  <p>What is wrong?</p>