add a test to demonstrate failure of deeply nested document 'exists' attribute
fix issue where a document retrieved from the database would not recursively set the 'exists' flag for all nested documents