Port the changes from contao/core@43110055258da0770ad0c9848c731859bb3eb891