Fix in matching for the rare situation when there is something like relative path a/b matches .../na/b while it should only match .../a/b