Remove unnecessary call to List.flatten.