AIG only insured investment banks owned by commercial banks? They insured investment banks which had at the time no connection to commercial banks.
And if Bank of America didn't buy Countrywide and Merill Lynch and JP Chase Morgan didn't buy Bear-Stearns they probably wouldn't have needed TARP funds and would have weathered the problems on their own without government help.
Citigroup and JP Morgan Chase had huge investment banking arms well before the financial crisis. What do you think the "JPMorgan" part of "JPMorgan Chase" does? Why do you think "group" part of "Citigroup" does?