Do we really need to reset the attributes of existing SchemaColumn and TupleValueExpression objects or can we make the subquery scan consistent with the table scan and just generate new ones? It seems risky to be adjusting the internals of the subquery to meet the expectations of the parent query -- just give the parent query its own structures.
Maybe then we can move towards making some members final (less worrying about mutable hash codes).