Fix crash when Layer added to LayoutGroup