We present a density-functional-theory analysis of crystalline and amorphous Zn- and Sn-based oxide systems which focuses on the electronic defect states within the band gap. A comparison of these electronic levels reveals that the hybrid functionals PBE0, HSE06, or B3LYP agree with a self-interaction corrected (SIC) local-density-approximation functional on occupied defect levels when similar treatments of the self-interaction are considered. However, for unoccupied levels, the hybrid functionals and the SIC approach lead to very different predictions. We show that a prerequisite for the determination of the energetic position of subgap states in these oxides is that a functional needs to predict correctly the electronic band structure over a wide energy range and not just close to the band gap. We conclude that for accurate defect levels, an adequate treatment of the self-interaction problem is required especially in the presence of nearby metal-metal interactions