Means for controlling the build-up of foam in the container to be filled