On the origin of DB white dwarfs