Ofgem says it will look at how it calculates the cap after a series of energy firms collapsed.