[Mac] Fix stack overflow caused by recent scrolling changes