Move the closing of VDI connection to also cover successful IMS fetches.

Spotted by:	scoof