Extension of First-Order Theories into Trees -- The Confluence Problem for Flat TRSs --