There are three problems at play…
In general, using analogRead to initialize the random number generator is a bad idea…
This is a better choice…
In your case using analogRead is disastrous because of #3 below.
Using modulus to reduce a Lehmer random number generator is a bad idea. But, the alternatives are annoying so a modulus is usually what is used. If you keep the most-significant-bits as the most-significant-bits instead of using modulus your problem will very likely disappear. However, if you insist on continuing to use analogRead a good hash function will work far better for what you are doing than a random number generator.
Low seed values with some prime number divisors are poison with the Park-Miller generator. I’m too lazy to find the thread but there is a detailed discussion on this forum. Given your experience seven is very likely one of those prime number divisors.