Port the changes from contao/core@4b294e9ebe0a0df765ebbd4f880c8703e0bd913a