Test procedure demonstrating the problem fixed by this commit:

```
mkdir test
fossil new test.fossil
fossil open test.fossil -f
fossil set allow-symlinks 1
mkdir subdir
cd subdir
ln -s xxx link
fossil addremove
fossil sql "SELECT islink FROM vfile"
fossil commit -m xxx
```

If the bug is not fixed, the SQL query will return "0" and the commit will fail:

```
ERROR: [subdir/link] is 3 bytes on disk but 0 in the repository
NOTICE: Repository version of [subdir/link] stored in [file-XXX]
working checkout does not match what would have ended up in the repository:  YYY versus ZZZ
```

The problem is that the stat buffer examined by file_islink(0) is for the directory containing the link, rather than the link itself.  This is due to it being preceded by a call to file_nondir_objects_on_path().  The fix is to call file_islink(0) first.