Validate layout data.
Separate buffer definition and layout definition.
Use given bufnr