Say there are two overlays placesOverlay.xul and macBrowserOverlay.xul and a master document aboutDialog.xul. The relationship is: aboutDialog.xul includes macBrowserOverlay.xul and macBrowserOverlay.xul includes placesOverlay.xul.
placesOverlay.xul
<commandset id="zzz">
<command id="zzzPlacesOverlay"/>
</commandset>