Layout specification and discovery should follow the same behavior as partials

Fixes #1047
nit: `<c>null</c>` here and on line 51