[BUGFIX] Properly respect exclude layout IDs

Change-Id: Id7740996930b345865a74060a772d5c1581f6754
Resolves: #58747
Reviewed-on: https://review.typo3.org/30066
Reviewed-by: Jo Hasenau
Tested-by: Jo Hasenau