Fix a crash in D3D destroying sub bitmaps.