Matteo Bruni : wined3d: Only invalidate STATE_INDEXBUFFER if the buffer being destroyed is bound as index buffer.