mesa: Validate target before resolving tex obj in glTex(ture)SubImageXD