Maybe you could use a Dictionary along with the ship in a container (or if the ship is a unique instance, just a plain Dictionary).
On collision with PowUpSpeed
--- Call "WeaponLeveling" ("Speed")
On function "WeaponLeveling"
\_Dictionary Key Function.Param(0) & "XP" >= 100
---Set Dictionary Key Function.Param(0) & "XP" to Dictionary.Get(Function.Param(0) & "XP") - 100
---Set Dictionary Key Function.Param(0) & "Level" to Dictionary.Get(Function.Param(0) & "Level") + 1
...
etc.
That would simulate reference passing, and most likely work as you intended.