Port the changes from contao/core@83a726fbc848adc0ed270e8e2381b9ce6cfd58fa