In SQLA 1.3.x, I used to follow this pattern to construct a query:
```
def load_something(... sort=False):
qry = select(columns=..., from_obj=...)
if sort:
qry = qry.order_by(desc(qry.c.created_on))
if ...
qry = qry...
```
but in 1.4.0 and 1.4.37 (I guess the versions in between as well), this doesn't work any more.
The error message that I now get relates to aliases being created which don't actually exist:
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) missing FROM-clause entry for table "anon_2"
LINE 4: WHERE task.type = 'xyz' ORDER BY anon_2.created_on DESC, ...
I've been using this pattern quite a lot. Is there a way to reinstate this functionality or monkey patch my version until I changed the code?