undo some changes to a sqlalchemy copy