Here's what happened in the terminal (I used [ code ] tags below, so you'll have top scroll side-to-side to see all my comments):
Code:
david@Davids-Linux-Desktop ~/Desktop $ calibre-debug -w ./scrambled.epub 2>&1
Initial opening of the ebook (I didn't hit any keys)
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 81.5518394649 x 81.6428571429
Using calibre Qt style: True
Viewport cfi: /2/4/2/2[title^-image]@0:0
Then I hit "200 <enter>" and the following immediately appeared, and text wrap was screwed up
ReferenceError: Can't find variable: book_indexing
Then I hit "300 <enter>" and the following immediately appeared, and text wrap was still screwed up
ReferenceError: Can't find variable: book_indexing
Then I hit "200 <enter>" and there was NO ReferenceError this time, and text wrapping was CORRECT, but page 200 was not the same page as it was originally
Then I hit "197 <enter>" and I was back at my original place (that used to be page 200), and text wrapping remained CORRECT
Viewport cfi: /2/4/28/1:1
Viewport cfi: /2/4/4/1:0
Viewport cfi: /2/4/4/1:0
david@Davids-Linux-Desktop ~/Desktop $
The "Viewport cfi" lines appeared asynchronously (they didn't appear to be directly related to any of my keystrokes, they just popped up whenever they felt like it).