This behaviour stopped for quite a while and then mysteriously came back. It was working on one install of Notepad++ but not in another - both the same version.
Turns out, it was related to word wrap. It works if that setting is off.
My solution is to get the current word wrap setting, set w-w off, set my visible line and reinstate the original w-w setting.