Prevent fatal error upon accessing the layout CP.
Merge pull request #5891 from openscholar/5877

Prevent fatal error upon accessing the layout CP.