smarter dependency handling for relate (avoids expensive total reindexes) and be smarter about removing most temp files