In the "not found" case in previous, the index is at 8, overrunning the buffer by one. Added check, please apply attached patch.
Created attachment 11009 [details] [review]
trivial, adds usual check....
This should already get caught in *CheckCompositeTexture. Doesn't it?
Ok, if it somehow guaranteed, that previously it has to go through R00CheckCompositeTexture(), then this is a "can't happen".