Skip uneeded scanlines (fixes #6)