The paths passed into the matcher are normalized (this applies to
include patterns and regular patterns, and to both glob kind and path
kind), so the regex for input "foo/" ended up being "foo(?:/|$)".
Once we have a (recursive) pattern kind only for directories, we could
switch to that here and remove the "mfiles == path" check. Until
then, let's at least make it not misleading.