It went to loop because Kies installed the latest update which your kernell does not support, replacing the old kernell with the new one would fix that but since the phone got replaced, i think you have to bother doing it. Good thing you haven't flash the root yet since that would void the warranty