Many of these stories were part of oral traditions before being written down and "canonized" by certain authors (sometimes to Christianize existing pagan folklore, as happened with Norse mythology) so mutation seems likely across generations and local cultures.
At the very least, in Russia there are many tales of Ivan outwitting the Devil, regardless of his profession. Maybe that's just a horizontal transfer and the story taking advantage of a previously unoccupied memetic niche...