Multi-stage annealing of defects in ion-implanted double-barrier diodes