fix regression in handling of symlinks in recursive functions: last recursivity fix made it so regular files were not affected