I noticed that the red rectangle drawn to indicate the viewport of the background viewer seems to always have the same x coordinate, despite the background scrolling horizontally.
This is also shown in this example, in which scroll is 0, 0 but the rectangle is slightly moved to the right.