[fix] Flatten before processing.