>> I found out the problem in the function "dired-insert-old-subdirs" >> at line 1367 in dired.el. > > There is a similar problem in `dired-sort-R-check' and > `dired-build-subdir-alist'. > > [There probably should be a function that checks for a given switch, > and does not just use `string-match-p' in such a simple way. > (At least it should respect case etc.)] Below is the implementation of such a function: