Fix a problem with renaming tables when the schema contains an invocation of a currently unregistered aggregate with a FILTER clause.

FossilOrigin-Name: bd37ce3fb8dee8d538f6afc0bfc13cdc3ebdd504e6461f0130c6ecc8af585f68
diff --git a/src/resolve.c b/src/resolve.c
index 8702048..be6430d 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -892,7 +892,7 @@
         }
       }
 #ifndef SQLITE_OMIT_WINDOWFUNC
-      else if( pWin ){
+      else if( ExprHasProperty(pExpr, EP_WinFunc) ){
         is_agg = 1;
       }
 #endif