Fix nested while loop
Complete SSA test