title: Wicket markup inheritance not working for wicket:child tags within MarkupContainers
body: <p>I'm using <a href="http://wicket.apache.org/guide/guide/single.html#layout_4" rel="nofollow">markup inheritance</a> in Wicket 6.14.0 to create a simple widget with title and content. The parent's markup looks like this:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket&gt;
  &lt;wicket:panel&gt;
  &lt;div wicket:id="widgetBox"&gt;
    &lt;div wicket:id="widgetTitle"&gt;&lt;wicket:enclosure child="icon"&gt;&lt;span class="icon"&gt;&lt;i wicket:id="icon"&gt;&lt;/i&gt;&lt;/span&gt;&lt;/wicket:enclosure&gt;
      &lt;h5 wicket:id="headline"&gt;&lt;/h5&gt;
    &lt;/div&gt;
    &lt;div wicket:id="widgetContent"&gt;&lt;wicket:child/&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;/wicket:panel&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Its code is pretty straight-forward, but for the sake of completeness:</p>
  
  <pre><code>public class ParentPanel extends Panel {
  
          public ParentPanel(final String id, final IModel&lt;String&gt; title) {
              super(id, title);       
  
              WebMarkupContainer widgetBox = new WebMarkupContainer("widgetBox");         
              add(widgetBox);
  
              final WebMarkupContainer widgetTitle = new WebMarkupContainer("widgetTitle");           
              widgetBox.add(widgetTitle);
  
              final WebMarkupContainer icon = new WebMarkupContainer("icon");
              if (titleIcon != null) {
                  // custom class
                  icon.add(new IconBehavior("titleIcon"));
              } else {
                  icon.setVisible(false);
              }
              widgetTitle.add(icon);
              widgetTitle.add(new Label("headline", title));
  
              widgetContent = new WebMarkupContainer("widgetContent");
              widgetContent.add(new WidgetContentBehavior());
              widgetBox.add(widgetContent);
          }
  }
  </code></pre>
  
  <p>Now for the child component. Here's its most simple markup:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket&gt;
  &lt;wicket:extend&gt;
    &lt;span wicket:id="foobar"&gt;&lt;/span&gt;
  &lt;/wicket:extend&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And of course the Java code:</p>
  
  <pre><code>public class ChildPanel extends ParentPanel {
  
      public ChildPanel(final String id, final IModel&lt;String&gt; title) {
          super(id, title);
          add(new Label("foobar", "Foobar"));
      }
  
  }
  </code></pre>
  
  <p>What I'm expecting of course is a rendered page saying "Foobar" where the wicket:child tag is placed. Instead there's this RuntimeException: </p>
  
  <pre><code>Last cause: Unable to find component with id 'foobar' in [TransparentWebMarkupContainer [Component id = wicket_extend3]]
      Expected: 'foobar:widgetBox:widgetContent:wicket_child2:wicket_extend3:foobar'.
      Found with similar names: 'foobar', foobar:foobar'
  </code></pre>
  
  <p>It seems as if markup inheritance does not support wicket:child tags within a MarkupContainer and therefore messes up the hierarchy. I also considered using a <a href="https://cwiki.apache.org/confluence/display/WICKET/Border" rel="nofollow">Border</a> instead, getting the same outcome though.</p>
  
  <p>My question of course is how to get this work by maintaining the current hierarchy, as it's important to have control (read: a Java Object) of widgetBox and widgetContent.</p>