Is there any way of matching one layer to another, similar to the paint bucket?

Oh. That’s easy enough. Once you’ve created the window component, select it and in Entity Info, choose the Window tag from the drop down list. That puts the Window tag on the window component. (you don’t put objects on tags, tags go on objects.)