Termination mechanism of inversion domains by stacking faults in GaN