Fixes #17416. Fix detection of finger move after change of direction of scrolling. Thanks Sebastien Brunot (IBM, CCLA)