Using `filter_by` after a join results in an error because SQLAlchemy tries to find that column in the joined table instead of the original one. 

Is there a way around this? Like unjoining, after filtering on something from the other table.

For instance, say I am filtering rows from table A because of relationship with a certain set of rows in table B. After that I want to filter on some table A fields, but when using filter\_by it gives an error.