I presume (for seeded-PRNG repeatability) your random(10) call(s) work off of an evolving data element that provides the basis of each chaotic-but-deterministic leap around the RNG-space (maybe a Linear Feedback Shift Register, at its heart, either of your own deliberate devising or through a library).
As such, you probably have to be sure that maybe-concurrent calls to the code that contains the stateful memory item don't (say) copy the value, transform it and then copy it back for the 'next' call, without a safeguard against interleaving these atomic operations. (Or half-n-halfing the write-back of the multibyte changed state, sending you off into a totally different part of the long-cycle stream of 'random' numbers, or even onto the 'null-value' that doesn't evolve and normally is not visited.)
That it doesn't crop up often enough to totally break the premise of the same-seed-same-result aim makes me think that you're protected by compiler/processor sanity regarding how such function calls get processed, perhaps the homegrown/library function deliberately introducing what are effectively sequence-stops and buffers against such weirdness.
Still, occasional flightiness might arise from happenstance unintended parallelisms, especially if different processing architectures get involved. Horrible to debug that sort of thing. Imma gonna assume I'm using my imagination too much, and that it isn't actually a problem at all. I'm sure you shouldn't worry about it. Much.