v1.0 (but present in previous releases)
Language name from filetype.conf not captured in variable $langkey when creating a new language scanner (sub new in Lang.pm). Perl doc says: loop variable in foreach is localized when entering the loop and is restored in its previous value when exiting the loop. Consequently, you cannot keep the last iteration value in the variable.
Fix: use a different variable for the loop and transfer its value into $langkey before exiting.