so to consolodate it
The yellow wire is the kill wire and it goes to ground to stop the engine
check that the key switch connects the yellow & black wires ( M & G terminals ) in the off position
If it does that then check that grounding the yellow wire kills the engine and there is continuity between the G pin on the key switch & ground .
If grounding the yellow wire does not stop the engine check that it is connected to the magneto.
The kill switches are the key switch & the seat switch which are parallel circuits so wither lifting your bum or turning off the switch should ground the magneto & stop the engine