[BUGFIX] Invalid hook into EXT:documentation

Change-Id: Ib5560899f7e49e9a81ecc05519606bf8e1c36492
Fixes: #52562
Reviewed-on: https://review.typo3.org/24445
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers