Right, I misunderstood the problem. The docs seem to imply (as best as I can tell from the pictures) that a displayed line should wrap to the same line when the layer edge is reached but we are reading from the next line instead.