Don't crash if AddDocument is passed fd -1.
Robustness fix.