The code as it currently stands do not return any parser arguments for any LanguageType::Other files.
The checks I removed were added for this commit: https://phabricator.kde.org/R32:1c78a564626a0e5e305383c5fdb36b0fc76073cc
However, I can't find it in the history: https://phabricator.kde.org/source/kdevelop/history/master/plugins/custom-definesandincludes/definesandincludesmanager.cpp
I suspect it wasn't merged properly and got lost.
Anyway, now parserArguments tries to guess language type for a file requested and for ProjectFolderItem LanguageType::Other is returned.