Fix shared GL context destructor to free correct texture.