Moved matching of exact directory names after repository names to avoid false hits on vendor names that match their project names.