d3d8: Fix GetDevice() for surfaces that are part of a texture.