#882 Layer should close widgets with the same name as its constructor.