re-allow temporary tables and cluster _rank before calculating the levels