Interestingly, I ran into this problem again yesterday while working on shadows, and went searching for Internet wisdom about the error message again.
Somehow, over the past year this blog post has become the top Google search result for that error message!
Anyhow. This time, I started receiving the error message after I changed the shadow map from being a plain texture to one that’s set up for PCF shadow filtering. I never did quite figure out exactly why it was complaining, but removing that array of texture samplers and replacing it with separate, named samplers for each texture did completely fix the problem.
Always nice to rediscover something old you’ve written, and discover it contains useful advice!