Port the changes from contao/core@6d20b93813bc8e1d955ccd102b574a75eef243c0