Revert "[fix] Flatten before processing."

This reverts commit e459306666c6f62c4fd6b09a37c77174a4f27da2.