Ensure that all ImageOutputs calling close() twice is safe.

It could be broken after the recent "tile emulation" change.