Simplify the query flattener so that it does not duplicate the WHERE clause
of subquery that is being incorporated into the outer query - copies it
directly. This is more efficient. And it also fixes the specific test case
show for ticket [
f09fcd17810f65f71789525] but it does not resolve the more
general problem that sqlite3ExprDup() does not correctly duplicate expressions
that contain subqueries with window functions.
FossilOrigin-Name:
f1b18d44ff855573542c1947a42d4025dff54cacc13dac14d044521762ea9736