Fix bug in AutocorrectAlignment#heredoc_ranges

Fixes #1174 and fixes #1176.