There’s another issue with the code, as evident from this line.
It only searches concepts defined in locale English! At the minimum, it should search for concepts defined in the system default locale. (it is mandatory to do so).
I have signed up for EA-130, I will do the above as part of the PR