Fix 24d0e21f51e88ab35cc3f1c1750741dfeb40933d correctly

CreateSubRequest() could still return an error and break out of the
while loop without exiting the outer for loop.

Instead we reset the error code before entering the for loop.