Port the changes from contao/core@acfae81c474f3a9f834370364cc520ef2e2185e0