[TASK] Correct overloading of settings in link generation

Change-Id: I5ebcf0fd1325c0c5446ae6386c9aec401520d065
Relates: #58844
Reviewed-on: https://review.typo3.org/30153
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer