Fixed a bug where subqueries were bleeding into each other.  The design of subqueries is flawed and needs to more cleanly separate the objects that are reused per query and new per query.  It would help some to have a mysql wrapper that actually, fully supported prepared statements.  That way the same SQL could be used over again with different variables.