Avoiding enan infinite loop when the server sends an invalid RSM