(#18494) Rearrange loop to remove Ruby 2.0 warning

Ruby 2.0 warned of the complex assignments in the while loop:

  lib/puppet/file_serving/fileset.rb:139: warning: found = in conditional, should be ==

The block that shifts to the next recursion level has been removed from the
loop expression to prevent the interpreter from warning.