Previously sparse will resolve working file context via its parent
unconditionally if the file is outside sparsematch (introduced by D788).
That could be problematic if the file only exists in working copy.
This patch changes it to always try working copy first (fast), then fallback
to parent commit if the file is outside sparse.