Mutations don’t need to be magic. The gene for floppy ears is not in the wolf population. It is a mutation that was selected for by dog breeders. A throwback mutation of that gene would give you a beagle with upright ears. If that was selected for, rather than against, you would have beagles with upright ears. Wolves don’t have genes for short stubby legs in their population.... etc, etc.
I think the point that Blueflag is making is that the genes that would produce wolf like characteristics have been bred out of the beagle line.
The wolf contains ALL the genes required to make a beagle. But the beagle does NOT contain all the genes to make a wolf.