It should have been brazed. That's a pressurized cooling
system. The spring in the cap allows pressurization of the cooling
system, so that the coolant
does not boil in steady state use. If pressure gets too high the spring compresses and allows steam/coolant to escape through that small hole in the side, sometimes into a small tank.
So, this fix has got to withstand the increased pressure. Gluing it is really not likely to provide that seal, in large part because the glue is being stretched, not compressed. All you've got is the ability of the glue to adhere to the smooth metal.