Corrected document unlocking (refs #3953)
Merge pull request #829 from eguaj/3.1-A3953

Corrected document domain unlocking (closes #3953)