Fix issue with DocumentNotFoundException not handling non-scalar values correctly.
Fixes #446