Fix 2 issues in DocumentManager Deprecated APIs

We should get this in for extensions as soon as we can
Fixes #8969
Fixes #8983