Retain the capture document while reading.

Fixes crash when document window is closed.