Fix an apparent off-by-one error.

The values being returned by _get_logical are those in the logical_start
and logical_end, which are 0-based. But the values that are stored in
the 'completed_lines' are from 'result', which is 1-based.
Merge branch 'master' of https://github.com/hhatto/autopep8