Solved by ptrblck in post #4 
              
              
                Thanks for the notebook! 
Your indentation of the return loss statement is wrong as you would return after a single iteration, which also explains the runtime difference.