Layouts: ignore "name", "lang" and "rtl" within the layout definition
Add "restricted" callback function. Fixes #305