[BUGFIX] Properly respect exclude layout IDs

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