Revert "Merge pull request #9589 from lodr/bug-828298-avoid-negative-offsets"

This reverts commit d6ab69091492a2743b50eae24f8965e5a07c9d1c, reversing
changes made to b2026cc332c8cd9f3e602367aca3421686740ab6.