it sounds like you’re dealing with concurrency/race condition issues.
You’re most likely correct.
There are a couple of discussions about race conditions in the forum. Some users have their own solutions like making the list static etc.
Here’s a great topic about achieving sequential numbers relaiably: How to achieve Unique, Sequential Numbers Reliably? - #25 by keith