Improved blocking of scrolling when swiping

Exactly as the commit message says.