avoid being stuck in previousFrameOffset() called from lastFrameOffset() when position >= length() https://pastebin.com/xjc4PK5N