Fix image states being removed too early on image destruction
Fix image states being removed too early on image destruction

* This causes problems if we're doing a last-second initial state prepare on
  destruction.

Zorro666/renderdoc,baldurk/renderdoc,baldurk/renderdoc,Zorro666/renderdoc,Zorro666/renderdoc,baldurk/renderdoc,baldurk/renderdoc,Zorro666/renderdoc,Zorro666/renderdoc,baldurk/renderdoc,Zorro666/renderdoc,baldurk/renderdoc