Ensure that SQLite does not attempt to process incompatible window functions in a single scan. Fix for [256741a1].

FossilOrigin-Name: 4f5b2d938194fab7627486e2ced633def2c90d9d3328e3700612feb9dbfa3d9a
diff --git a/src/expr.c b/src/expr.c
index e00b319..8f02ae5 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1325,12 +1325,7 @@
     assert( pWin );
     assert( IsWindowFunc(pExpr) );
     assert( pWin->ppThis==0 );
-    if( pSelect->pWin ){
-      pSelect->pWin->ppThis = &pWin->pNextWin;
-    }
-    pWin->pNextWin = pSelect->pWin;
-    pWin->ppThis = &pSelect->pWin;
-    pSelect->pWin = pWin;
+    sqlite3WindowLink(pSelect, pWin);
   }
   return WRC_Continue;
 }