Port the changes from contao/core@8a57310f8165363a95ded29c7ba9c637fc205302