Prevent an invalid pointer state in docloader.
Merge branch 'master' into guid-work