OAK-3670: RDBDocumentStore on SQLServer: off-by-one bug may cause truncated JSON to be written (ported to 1.2)