add tot_size checking back in to dof_indices calls