Without digging into your test results, my guess is that the relay is triggering the intermittent function without the required ground input from L-B. Maybe the input transistor is failing? If you can swap the relay, it might solve the entire issue. Or if you really want to diagnose it, you could pull the L-B input up to +12v to see if that shuts it off.
'03 KTM 450EXC
"If you know what you're doing, then you aren't learning anything." - A. Lincoln