* If it's unsupported or invalid, then there's no point trying to rebuild it using a value that may have been derived from the same layout to begin with.
* Move the checks before the attempts at copying the layout while at it.
(CVE-2024-7272, bsc#1229261)