I just want to add something to the big pinside pool of knowledge:
I had this exact same problem. intermittant and annoying. but only when one ball was locked.
i started to change switches one by one. after i changed the ball through 1 switch, the problem occured every time i had one ball locked.
It turned out to be a poorly grounded machine and an unwanted connection.
Every time ball lock 1 was activated AND the wire on ball through 1 touched the ball shooter. it would serve another ball.
a bit of bending of the wire solved the problem for good.
switch (resized).jpg