There is an old topic that has the exact same issue I have quoted below.
Quoted from debaser:
I'm working on a Williams Indiana Jones that is having some issues with the ball lock. Once in awhile during play the game will think a ball has been locked and put another ball in the shooter lane. At this point there will be two balls in play when there should only be one. Once one of those balls drains, the ball in play is ended. It will then put two balls in the shooter lane until the end of the game.
I will think I have it fixed, play a few games and it works fine, and then it will happen again.
The fix for his issue seemed to be a problem with a Great Lakes Modular 10 opto board having a glitch with IJ. I do not have a GLM 10 opto board so I'm not sure if the same problem can happen with the original board or it is something else. It does have a set of GLM trough boards however if that could be an issue. I have looked at the usual causes such as the switch under the front of the path of adventure and dirty or bad optos in idol ball lock and it is all fine. Has anybody else had this problem or have some suggestions? Thanks.