[Fix #538] Fix bug in `Blocks` auto-correction.
Merge pull request #541 from jonas054/fix_autocorrect_do_end

[Fix #538] Fix bug in `Blocks` auto-correction.