Clean up looping on dataset list retrieval.