Bug when copying extension elements.

Suppose we start with this WADL:

````xml
<application xmlns="http://wadl.dev.java.net/2009/02" xmlns:rax="http://docs.rackspace.com/api">
  <grammars/>
  <resources base="https://test.api.openstack.com">
    <resource path="path">
      <method name="GET">
        <response status="200 203"/>
      </method>
      <resource path="to/my/resource" rax:invisible="true">
        <method name="GET">
          <response status="200 203"/>
        </method>
        <method name="DELETE">
          <response status="200"/>
        </method>
        <rax:log href="my_log.txt"/>
      </resource>
      <rax:foo/>
    </resource>
  </resources>
</application>
````

Notice ```rax:foo``` and ```rax:log```.  After converting to ```TREE``` mode you should get 3 instances of ```rax:log``` (for 'to', 'my', 'resource') and a single instance of ```rax:foo```. Instead we get an extra instance of each as shown:

````xml
<application xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rax="http://docs.rackspace.com/api" xmlns="http://wadl.dev.java.net/2009/02">
  <grammars/>
  <resources base="https://test.api.openstack.com">
    <resource id="rax-path-0" queryType="application/x-www-form-urlencoded" path="path">
      <rax:foo/>
      <method name="GET">
        <response status="200 203"/>
      </method>
      <rax:foo/>
      <resource rax:invisible="true" queryType="application/x-www-form-urlencoded" path="to">
        <rax:log href="test://path/to/test/my_log.txt"/>
        <resource rax:invisible="true" queryType="application/x-www-form-urlencoded" path="my">
          <rax:log href="test://path/to/test/my_log.txt"/>
          <resource id="rax-path-to-my-resource-0" rax:invisible="true" queryType="application/x-www-form-urlencoded" path="resource">
            <rax:log href="test://path/to/test/my_log.txt"/>
            <method name="GET">
              <response status="200 203"/>
            </method>
            <method name="DELETE">
              <response status="200"/>
            </method>
            <rax:log href="test://path/to/test/my_log.txt"/>
          </resource>
        </resource>
      </resource>
    </resource>
  </resources>
</application>
````