On commons and EN Wikipedia we seem to have many clashes with existing user templates for example commons:template:User BG-3 gives 'This user is able to contribute at an advanced level to bitmap graphics (JPEG, PNG,...)." message and is unrelated to commons:template:User bg-3 about user knowledge of Bulgarian language. See Commons:User:Jarekt/c for more Commons examples and w:en:User:Jarekt/b for few EN Wikipedia examples.
In many cases the clash can be avoided if Babel extension pay attention to capitalization. May be the ideal approach would be to treat lower case codes as language code, otherwise check if there is a match to existing template, and than convert to lower case and try matching to the language codes again.
In some cases the clashes can not be avoided since local templates commons:template:User bot or commons:template:User win use lower case and clash with Ho-Chunk and Bongo languages. However in those cases local template can be renamed to commons:template:User Bot or commons:template:User Win to keep them separate.