PR32300, --dependency-file: link dependencies are not all collected

	PR 32300
	PR 31904
Revert patch accidentally committed with 057a2b4c4b
12 files changed