Not a bug, mechanical issue with your game most likely. Likely that your ball trough is registering balls drained which have not, or the lock mechanism is not seeing balls still in the lock that are still there.
Check the switches in your ball trough (optos) and the switches in the lock assembly.
if it were me, i would pull both assy's and rebuild them, because, hey, they could probably use it.
-cAyle