chore(ddLib): fix bug that doesnt set the closest match for each iteration of directiveTypes