Fix nested queries for projects and accounts.
Fix and test recursive models.