Bring C++ docdb support in line with Java implementation