Works around a problem in the old Lua API where a trait lookup would
not find the correct class and make the script crash.
In this instance, `Game.modData.ObjectCreator.FindType("RallyPoint")`
return `OpenRA.Mods.Common.Effects.RallyPoint` instead of the expected
`OpenRA.Mods.Common.RallyPoint`.
The other change is an oversight from the recent warhead rewrites.
Fixes#6728
The onDamaged event handler would still fire after an enemy building had
been captured. Fixed by checking the owner before starting repairs.
Thanks to Microbit for showing me that people actually did that.