GL seems to be getting confused as we reuse a single texture ID for all surfaces. And in the above scenario it only uses the second upload for both surfaces.
So it could be a bug in Mesa's glEGLImageTargetTexture2DOES, or less likely it could be that texture ID reuse like this is not quite legal.
The problem seems to be when a hardware surface is in front of a software surface of the same dimensions. So we call:
1. Software surface: glTexImage2D tTexture2DOES
2. Hardware surface: glEGLImageTarge
GL seems to be getting confused as we reuse a single texture ID for all surfaces. And in the above scenario it only uses the second upload for both surfaces.
So it could be a bug in Mesa's glEGLImageTarge tTexture2DOES, or less likely it could be that texture ID reuse like this is not quite legal.