Corrected document unlocking (refs #3953)