Disable scrolling for `overflow: hidden` elements

This prevents us from scrolling what should be non-scrolling elements. Fixes #1225.
It looks like `lastElement` is not being used at all; and hasn't been for some time!