Okay, I did not take the 'magic' of DirCache into account. Now I understand that for an ignored folder, that does not contain any (previously) tracked files, the rawmode of the DirCache entry is 0 (which allows the original implemantation to skip the entire folder). Whereas for folders (ignored or not), that contain tracked files, the rawmode is not 0. Or to put it in other words: DirCache only contains folders, if they contain tracked files...