I have the following partial view

@model TMSWeb.ExtNETCore.Pages.Shared.FlagsPartialModel
@{
    Html.X().FieldSet()
            .Title("Flags")
            .Width(400)
            .Layout(LayoutType.Container)
            .RenderTo("PanelFlags")
            .Items(
                Html.X().CheckboxGroup()
                    .Name("Flags")
                    .Items(Model.Checkboxes)
            );
}
that I am trying to host in a panel on a parent page

<ext-panel id="PanelFlags">
  <items>
    <ext-partial name="_Flags"
                 model='new FlagsPartialModel { ObjectId = 117, Flags = 17 }' />
  </items>
</ext-panel>
The page fails to render with the error

Cannot read property 'dom' of null
at constructor.doInsert (ext-all-debug.js:128095)
at constructor.append (ext-all-debug.js:128068)
at constructor.render (ext-all-debug.js:70846)
at constructor (ext-all-debug.js:74177)
at new Ext.form.FieldSet (ext-all-debug.js:14564)
at eval (eval at getInstantiator (ext-all-debug.js:16491), <anonymous>:3:8)
at Object.create (ext-all-debug.js:17025)
at Customers:18
at Object.invoke (ext-all-debug.js:20532)
at Object.doInvokeAll (ext-all-debug.js:20576)
Looking at the JavaScript code that is generated, the framework is trying to create the FieldSet component in the child partial view before the components in the parent view have been created. So the 'PanelFlags' component that has been specified as the target to render the FieldSet to hasn't been created yet.

Is there something that I'm missing here? What needs to be changed to ensure that the components in the child view are created after those in the parent view?