Known licenses names and search logic is corrected (#13212).

Change-Id: I06676579dc3cefc7da6627c95d85f1bc9efabc80