schema_document: Fix off-by-one error