direct3d: Be more aggressive about resetting state when textures go away.

Fixes Bugzilla #4768.
1 file changed