Viewer next/back controls respect data boundaries, fixes #32