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

This reverts commit 4840d034ff6c677f7f2151cffa068f99b44ab6be.