Refactor changes_row and add a comment

The two function clauses duplicated a good bit of work, so I collapsed
them.  I also added a comment explaining the peculiar transformation
that happens if include_docs=true and we encounter an error reading the
document.