Last Index == 0 means that there is one ball found, the array has 1 member at index 0. So you’re saying, if one ball is left, spawn another one.
Try using one of the following:
IsValidIndex 0
Length > 0
These will mean there is at least 1 ball on the table, so you’ll want to use the false pin to spawn the next ball.