Properly set diridx counter.