cache: only let non-dir descriptors through when doing EMPTYPATH lookups
Otherwise things like realpath against a file and '.' end up with an
illegal state of having a regular vnode for the parent.
Reported by: syzbot+9aa5439dd9c708aeb1a8@syzkaller.appspotmail.com
(cherry picked from commit 628c3b307fb29e9812008b8a0b3ccb73e0f0ecfa)