Another tips that related to Custom Files with Include common files option disabled is, sometimes you want to get the current language ID by using CurrentLanguageID() global function.
To achieve this, then you have to create Container for app.language
as follows:
$lang = Container("app.language");
echo "<br>CurrentLanguageID(): " . CurrentLanguageID();
echo "<br>LanguageID: " . $lang->LanguageId;