user-defined variable and nested loops

Hi,

I'm wondering if a user-defined variable is available in a following loop. It seems not, but, I the very next loop it seems so. I don't understand, can somebody explain? Here's a piece of code:

$filename(%_workingdir%.tex)
---total files is %_total_files%---
begin loop $loop(%artist%,1)%artist%
---total files is %_total_files%---
  begin loop $loop(%album%)
---total files is %_total_files%---
$puts(%myvariable%,%_total_files%) --> $get(%myvariable%) <--
    begin loop $loop(%_filename_ext%) --> $get(%myvariable%) <--
Track $num(%track%,2)
---total files is %_total_files% --> $get(%myvariable%) <--
end loop $loopend()
---total files is %_total_files% --> $get(5myvariable%) <--
  end loop $loopend()
---total files is %_total_files%--- 
end loop $loopend()
---total files is %_total_files%---

You might run the code above in a directory of a artist, where more than one album (e.g. folder) exists. In my case, initially %myvariable% is assigned to %_total_files% (what I want). Then, a loop opens (1st album), but inside this loop, %myvariable% is empty. After that loop the old value comes out again and stayed even in the next loop (2nd album).

Is it a feature? Is it possible to tune the script, that inside the loop over an album (e.g. a folder, e.g. $loop(%_filename_ext%)) the pre-defined variable %myvariable% exists with the correct value?

BTW: The questions is related to: /t/7231/1.

Thanks in advance! LosMintos

within the first album the value of %myvariable% is empty