Top trick for welding a nut on - put a washer (if you can) between the nut and casting. Really does help the weld not to stick to the casing.
I was skeptical but had a bolt break off flush to the casting on my lawnmowers rear axle casing where it wasn't possible to get all but a specialist air collet drill. Took a few goes with the stick turned up to the max but the washer really did help. Nut was red glowing red once done and once cooled wound straight out.