Fix for bug #3022, allowing for mixing Object API and Graph/Document API in one thread
Merge pull request #3035 from wouterv/mixed-mode-bugfix2

Fix for bug #3022, allowing for mixing Object API and Graph/Document API...