core: Remove panics from some Layout methods
#49884
+14
−8
Merged