Port the changes from contao/core@e761e1e18445212216af617fd461efcaf0697531