Fixed unexpected effects of zooming outside the data range. Closes #1734.