applescript original path from alias

I am trying to get a list of files pointed to by a directory alias. In applescript the recursive block below works about 10% of the time and provides a list of all files as it decends the directory path using both direct and alias directory references.


The rest of the time it simply list the directory alias like a file instead of decending into it to list additional files. The goal is to expand and list all files referenced by the directory alias and any subsequent aliases being used



---------------------------------------

on dump_folder(f)

global fl

tell application "System Events" to set end of fl to (get the POSIX path of f)

tell application "Finder" to set nfl to (the items of the contents of f)

repeat with nf in nfl

dump_folder(nf as alias)

end repeat

end dump_folder

------------------------------------------