This doesn't work now:
<wicket:container wicket:id="id" />
because EnclosureHandler ignores wicket tags when it looks for children. I don't know what the rational was when doing this.
I'll attach a proposed patch with a new testcase. It changes the current logic how to look for children. This may contain errors or may otherwise not be a good idea. Nonetheless all tests succeed and it works within my applications.