Closure mechanism of the A1 and A2 modes in jet screech