Fixed a bug where subqueries had not yet been updated to reflect the recent query result changes.